Corelib
ByteArray
pub fn compute_keccak_byte_array(arr: ByteArray) -> u256
arr
u256
use core::keccak::compute_keccak_byte_array; let text: ByteArray = "Hello world!"; let hash = compute_keccak_byte_array(@text); assert!(hash == 0xabea1f2503529a21734e2077c8b584d7bee3f45550c2d2f12a198ea908e1d0ec);
Was this page helpful?