pub fn keccak512_array(value: &[u8]) -> [u8; 64]
Expand description
Hashes the bytes using the Keccak-512 hash function. This returns a 64 byte hash.
ยงExamples
use near_sdk::env::keccak512_array;
use hex;
assert_eq!(
&keccak512_array(b"The phrase that will be hashed"),
hex::decode("29a7df7b889a443fdfbd769adb57ef7e98e6159187b582baba778c06e8b41a75f61367257e8c525a95b3f13ddf432f115d1df128a910c8fc93221db136d92b31")
.expect("Decoding failed")
.as_slice()
);