Crates.io | solana-nostd-keccak |
lib.rs | solana-nostd-keccak |
version | 0.1.3 |
source | src |
created_at | 2024-09-12 03:42:54.318376 |
updated_at | 2024-09-12 10:26:38.604897 |
description | A more efficient implementation of Keccak256 for SVM |
homepage | |
repository | |
max_upload_size | |
id | 1372461 |
size | 6,032 |
A more efficient implementation of Keccak256 for SVM.
cargo add solana-nostd-keccak
hash_ref
which takes in any type that implements <AsRef<[u8]>>
Hash
struct. Returns [u8;32]
directly.hash_into
to let you hash directly into a mutable buffer.library | function | CU cost |
---|---|---|
nostd-keccak | hashv(&[b"test"]) | 100 |
nostd-keccak | hash(b"test") | 105 |
nostd-keccak | hash_ref("test") | 105 |
solana-program | hashv(&[b"test"]) | 121 |
solana-program | hash(b"test") | 123 |