Refactored some type EIP712 formatting and hashing code to re-use it

This commit is contained in:
Alexandre Paillier
2022-06-29 14:08:08 +02:00
parent 1b00038859
commit 5450f0c46f
6 changed files with 188 additions and 103 deletions

View File

@@ -0,0 +1,13 @@
#ifndef HASH_BYTES_H_
#define HASH_BYTES_H_
#ifdef HAVE_EIP712_FULL_SUPPORT
#include "cx.h"
void hash_nbytes(const uint8_t *const bytes_ptr, uint8_t n, cx_hash_t *hash_ctx);
void hash_byte(uint8_t byte, cx_hash_t *hash_ctx);
#endif // HAVE_EIP712_FULL_SUPPORT
#endif // HASH_BYTES_H_