Do not hardcode the size of md
This commit is contained in:
parent
af4af8a0d8
commit
ce124c4894
@ -105,7 +105,7 @@ void md5_init(void *ctx)
|
||||
s->h[3] = 0x10325476;
|
||||
}
|
||||
|
||||
void md5_sum(void *ctx, uint8_t md[16])
|
||||
void md5_sum(void *ctx, uint8_t md[MD5_DIGEST_LENGTH])
|
||||
{
|
||||
struct md5 *s = ctx;
|
||||
int i;
|
||||
|
@ -101,7 +101,7 @@ void sha1_init(void *ctx)
|
||||
s->h[4] = 0xC3D2E1F0;
|
||||
}
|
||||
|
||||
void sha1_sum(void *ctx, uint8_t md[20])
|
||||
void sha1_sum(void *ctx, uint8_t md[SHA1_DIGEST_LENGTH])
|
||||
{
|
||||
struct sha1 *s = ctx;
|
||||
int i;
|
||||
|
Loading…
Reference in New Issue
Block a user