Do not hardcode the size of md

This commit is contained in:
sin 2013-07-19 14:31:42 +01:00 committed by David Galos
parent af4af8a0d8
commit ce124c4894
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;