Corelib
pub fn compute_sha256_u32_array( mut input: Array, last_input_word: u32, last_input_num_bytes: u32, ) -> [u32; 8]
input
u32
last_input_word
last_input_num_bytes
input array
use core::sha256::compute_sha256_u32_array; let hash = compute_sha256_u32_array(array![0x68656c6c], 0x6f, 1); assert!(hash == [0x2cf24dba, 0x5fb0a30e, 0x26e83b2a, 0xc5b9e29e, 0x1b161e5c, 0x1fa7425e, 0x73043362, 0x938b9824]);
Was this page helpful?