Remove CX_COMPLIANCE_141

This commit is contained in:
BTChip github
2020-01-18 12:46:37 +01:00
parent 05511ec14e
commit 658164ae18
2 changed files with 7 additions and 7 deletions

View File

@@ -124,7 +124,7 @@ void getEthAddressFromKey(cx_ecfp_public_key_t *publicKey, uint8_t *out,
cx_sha3_t *sha3Context) {
uint8_t hashAddress[32];
cx_keccak_init(sha3Context, 256);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, publicKey->W + 1, 64, hashAddress);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, publicKey->W + 1, 64, hashAddress, 32);
os_memmove(out, hashAddress + 12, 20);
}
@@ -159,7 +159,7 @@ void getEthAddressStringFromKey(cx_ecfp_public_key_t *publicKey, uint8_t *out,
cx_sha3_t *sha3Context) {
uint8_t hashAddress[32];
cx_keccak_init(sha3Context, 256);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, publicKey->W + 1, 64, hashAddress);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, publicKey->W + 1, 64, hashAddress, 32);
getEthAddressStringFromBinary(hashAddress + 12, out, sha3Context);
}
@@ -168,7 +168,7 @@ void getEthAddressStringFromBinary(uint8_t *address, uint8_t *out,
uint8_t hashChecksum[32];
uint8_t i;
cx_keccak_init(sha3Context, 256);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, address, 20, hashChecksum);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, address, 20, hashChecksum, 32);
for (i = 0; i < 40; i++) {
out[i] = convertDigit(address, i, hashChecksum);
}
@@ -183,7 +183,7 @@ void getEthAddressStringFromKey(cx_ecfp_public_key_t *publicKey, uint8_t *out,
cx_sha3_t *sha3Context) {
uint8_t hashAddress[32];
cx_keccak_init(sha3Context, 256);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, publicKey->W + 1, 64, hashAddress);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, publicKey->W + 1, 64, hashAddress, 32);
getEthAddressStringFromBinary(hashAddress + 12, out, sha3Context);
}
@@ -210,7 +210,7 @@ void getEthAddressStringFromBinary(uint8_t *address, uint8_t *out,
tmp[offset + 2 * i + 1] = HEXDIGITS[digit & 0x0f];
}
cx_keccak_init(sha3Context, 256);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, tmp, offset + 40, hashChecksum);
cx_hash((cx_hash_t*)sha3Context, CX_LAST, tmp, offset + 40, hashChecksum, 32);
for (i = 0; i < 40; i++) {
uint8_t digit = address[i / 2];
if ((i % 2) == 0) {