diff --git a/src_features/signMessageEIP712/eip712.h b/src_features/signMessageEIP712/eip712.h index b25790f..41c54f9 100644 --- a/src_features/signMessageEIP712/eip712.h +++ b/src_features/signMessageEIP712/eip712.h @@ -57,7 +57,7 @@ typedef enum #define TYPESIZE_MASK (1 << 6) #define TYPENAME_ENUM (0xF) -#define KECCAK256_HASH_LENGTH 32 +#define KECCAK256_HASH_BYTESIZE 32 #define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0])) diff --git a/src_features/signMessageEIP712/type_hash.c b/src_features/signMessageEIP712/type_hash.c index 1069bf5..bd5680e 100644 --- a/src_features/signMessageEIP712/type_hash.c +++ b/src_features/signMessageEIP712/type_hash.c @@ -38,7 +38,7 @@ const uint8_t *type_hash(const void *const structs_array, mem_dealloc(mem_alloc(0) - mem_loc_bak); // copy hash into memory - if ((hash_ptr = mem_alloc(KECCAK256_HASH_LENGTH)) == NULL) + if ((hash_ptr = mem_alloc(KECCAK256_HASH_BYTESIZE)) == NULL) { return NULL; } @@ -47,11 +47,11 @@ const uint8_t *type_hash(const void *const structs_array, NULL, 0, hash_ptr, - KECCAK256_HASH_LENGTH); + KECCAK256_HASH_BYTESIZE); #ifdef DEBUG // print computed hash printf("-> 0x"); - for (int idx = 0; idx < KECCAK256_HASH_LENGTH; ++idx) + for (int idx = 0; idx < KECCAK256_HASH_BYTESIZE; ++idx) { printf("%.02x", hash_ptr[idx]); }