Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: RFrec_full RFtrans_full
hmac_md5.cpp
00001 #include "hmac_md5.h" 00002 #include "hmac.h" 00003 #include "coding.h" 00004 00005 void HMAC_MD5(const char * szKey, const char * szText, char * szOutput) 00006 { 00007 Hmac hmac; 00008 char hmacOutput[MD5_DIGEST_SIZE + 1]; 00009 00010 HmacSetKey(&hmac, MD5, (const byte *) szKey, strlen(szKey)); 00011 HmacUpdate(&hmac, (const byte *) szText, strlen(szText)); 00012 00013 HmacFinal(&hmac, (byte *) hmacOutput); 00014 00015 int encodedLength = 25; 00016 Base64_Encode((const byte *) hmacOutput, MD5_DIGEST_SIZE, (byte *) szOutput, (word32*) &encodedLength); 00017 szOutput[encodedLength] = 0; 00018 00019 }
Generated on Wed Jul 13 2022 10:25:18 by
1.7.2