Skip to content

Commit

Permalink
move MD5_DIGEST_SIZE from checksums.c to md5.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Bernhard R. Link committed Nov 3, 2012
1 parent 41c39dd commit 745718b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion checksums.c
Original file line number Diff line number Diff line change
Expand Up @@ -1140,7 +1140,6 @@ static const char tab[16] = {'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};

retvalue checksums_from_context(struct checksums **out, struct checksumscontext *context) {
#define MD5_DIGEST_SIZE 16
unsigned char md5buffer[MD5_DIGEST_SIZE], sha1buffer[SHA1_DIGEST_SIZE],
sha256buffer[SHA256_DIGEST_SIZE];
char *d;
Expand Down
4 changes: 3 additions & 1 deletion md5.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#ifndef MD5_H
#define MD5_H

#define MD5_DIGEST_SIZE 16

#define md5byte unsigned char
#define UWORD32 unsigned int

Expand All @@ -34,6 +36,6 @@ struct MD5Context {

void MD5Init(/*@out@*/struct MD5Context *context);
void MD5Update(struct MD5Context *context, md5byte const *buf, unsigned int len);
void MD5Final(/*@out@*/unsigned char digest[16], struct MD5Context *context);
void MD5Final(/*@out@*/unsigned char digest[MD5_DIGEST_SIZE], struct MD5Context *context);

#endif /* !MD5_H */

0 comments on commit 745718b

Please sign in to comment.