mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 10:43:01 +08:00
hash init
This commit is contained in:
parent
88b2cf41de
commit
506da60cad
1 changed files with 2 additions and 1 deletions
|
@ -109,7 +109,8 @@ static unsigned char *emv_pki_decode_message(const struct emv_pk *enc_pk,
|
|||
}
|
||||
va_end(vl);
|
||||
|
||||
uint8_t hash[20] = {0};
|
||||
uint8_t hash[hash_len];
|
||||
memset(hash, 0, hash_len);
|
||||
memcpy(hash, crypto_hash_read(ch), hash_len);
|
||||
if (memcmp(data + data_len - 1 - hash_len, hash, hash_len)) {
|
||||
printf("ERROR: Calculated wrong hash\n");
|
||||
|
|
Loading…
Reference in a new issue