This library implements some hash and cryptographic algorithms.

Dependents:   ES_CW2_Starter_JIN EMBEDDED_CW2 EMBEDDED_CW2_Final Spinnybois ... more

Fork of Crypto by Francois Berder

Files at this revision

API Documentation at this revision

Comitter:
feb11
Date:
Wed Oct 02 16:39:00 2013 +0000
Parent:
10:bc9c23aa3870
Child:
12:cb30c135cd5f
Commit message:
fixed bug in HMAC

Changed in this revision

hash/HMAC.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/hash/HMAC.cpp	Tue Sep 24 07:19:04 2013 +0000
+++ b/hash/HMAC.cpp	Wed Oct 02 16:39:00 2013 +0000
@@ -32,7 +32,7 @@
     algo->finalize(buffer);
     
     memcpy(buffer2, key, keyLength);
-    memset(&buffer2[keyLength], 0, keyLength);
+    memset(&buffer2[keyLength], 0, 64-keyLength);
     for(int i = 0; i < 64; ++i)
         buffer2[i] ^= 0x5C;