* Add Keccak256 syscall and sdk support (#16498)
(cherry picked from commit 8eb05d6ed4
)
# Conflicts:
# Cargo.lock
# programs/bpf/Cargo.lock
# programs/bpf/rust/sha/Cargo.toml
# programs/bpf/tests/programs.rs
# programs/bpf_loader/Cargo.toml
# sdk/program/Cargo.toml
# sdk/program/src/lib.rs
# sdk/src/feature_set.rs
* resolve conflicts
Co-authored-by: Jack May <jack@solana.com>
This commit is contained in:
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user