centralizing MAX_DIGEST_SIZE definition in hmac.h

This commit is contained in:
Moisés Guimarães
2013-09-06 15:53:22 -03:00
parent f2c75a9e87
commit d7a08b1a76
5 changed files with 13 additions and 27 deletions

View File

@@ -106,11 +106,7 @@ int PBKDF2(byte* output, const byte* passwd, int pLen, const byte* salt,
int hLen;
int j;
Hmac hmac;
#ifdef CYASSL_SHA512
byte buffer[SHA512_DIGEST_SIZE];
#else
byte buffer[INNER_HASH_SIZE]; /* max size, doesn't handle 512 yet */
#endif
byte buffer[MAX_DIGEST_SIZE];
if (hashType == MD5) {
hLen = MD5_DIGEST_SIZE;