Add Keccak256 syscall and sdk support (#16498)

This commit is contained in:
Jack May
2021-05-10 16:16:58 -07:00
committed by GitHub
parent e511c442e6
commit 8eb05d6ed4
17 changed files with 366 additions and 73 deletions

View File

@ -437,6 +437,24 @@ uint64_t sol_sha256(
const uint8_t *result
);
/**
* Length of a Keccak hash result
*/
#define KECCAK_RESULT_LENGTH 32
/**
* Keccak
*
* @param bytes Array of byte arrays
* @param bytes_len Number of byte arrays
* @param result 32 byte array to hold the result
*/
uint64_t sol_keccak256(
const SolBytes *bytes,
int bytes_len,
const uint8_t *result
);
/**
* Account Meta
*/