Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const uint8_t* msg, size_t len){
- hashlib_Sha256Update(&hmac->sha256_ctx, msg, len);
- }
- void hashlib_HMACSha256Final(hmac_ctx* hmac, uint8_t *output){
- uint8_t tmpbuf[32];
- hmac_ctx tmp;
- memcpy(&tmp, hmac, sizeof(tmp));
- hashlib_Sha256Final( &tmp.sha256_ctx, tmpbuf );
- hashlib_Sha256Init( &tmp.sha256_ctx);
- hashlib_Sha256Update( &tmp.sha256_ctx, hmac->opad, 64 );
- hashlib_Sha256Update( &tmp.sha256_ctx, tmpbuf, 32);
- hashlib_Sha256Final( &tmp.sha256_ctx, output );
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement