Bug 383390, nsICrypto Hash truncates to 32 byte; renders sha384 and sha512 corrupt

Patch contributed by Nils Maier
r=kengert


git-svn-id: svn://10.0.0.236/trunk@227792 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kaie%kuix.de 2007-06-11 01:42:36 +00:00
parent 23379e21a4
commit 929ebaed06

View File

@ -2407,7 +2407,7 @@ nsCryptoHash::Finish(PRBool ascii, nsACString & _retval)
unsigned char buffer[HASH_LENGTH_MAX];
unsigned char* pbuffer = buffer;
HASH_End(mHashContext, pbuffer, &hashLen, 32);
HASH_End(mHashContext, pbuffer, &hashLen, HASH_LENGTH_MAX);
HASH_Destroy(mHashContext);
mHashContext = nsnull;