Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename variable #147

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions hash/sha512.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ void hmac_sha512(unsigned char *key, int key_length, unsigned char *message, int

uint8_t ipad[SHA512_BLOCK_SIZE];
uint8_t opad[SHA512_BLOCK_SIZE];
uint8_t hash[SHA512_HASH_LENGTH];
uint8_t u8_hash[SHA512_HASH_LENGTH];
int i;

// TODO Handle key larger than 128
Expand All @@ -378,11 +378,11 @@ void hmac_sha512(unsigned char *key, int key_length, unsigned char *message, int
CSHA512 h;
h.WriteDirect128(ipad);
h.Write(message, message_length);
h.Finalize(hash);
h.Finalize(u8_hash);

h.Initialize();
h.WriteDirect128(opad);
h.Write(hash, SHA512_HASH_LENGTH);
h.Write(u8_hash, SHA512_HASH_LENGTH);
h.Finalize(digest);

}
Expand Down