pub fn hashv(vals: &[&[u8]]) -> Hash {
    // Perform the calculation inline, calling this from within a program is
    // not supported
    #[cfg(not(target_arch = "bpf"))]
    {
        let mut hasher = Hasher::default();
        hasher.hashv(vals);
        hasher.result()
    }
    // Call via a system call to perform the calculation
    #[cfg(target_arch = "bpf")]
    {
        extern "C" {
            fn sol_keccak256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64;
        }
        let mut hash_result = [0; HASH_BYTES];
        unsafe {
            sol_keccak256(
                vals as *const _ as *const u8,
                vals.len() as u64,
                &mut hash_result as *mut _ as *mut u8,
            );
        }
        Hash::new_from_array(hash_result)
    }
}
/// Return a Keccak256 hash for the given data.
Return a Keccak256 hash for the given data.
Return a Keccak256 hash for the given data .
pub fn hashv(vals: &[&[u8]]) -> Hash {
    // Perform the calculation inline, calling this from within a program is
    // not supported
    #[cfg(not(target_arch = "bpf"))]
    {
        let mut hasher = Hasher::default();
        hasher.hashv(vals);
        hasher.result()
    }
    // Call via a system call to perform the calculation
    #[cfg(target_arch = "bpf")]
    {
        extern "C" {
            fn sol_keccak256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64;
        }
        let mut hash_result = [0; HASH_BYTES];
        unsafe {
            sol_keccak256(
                vals as *const _ as *const u8,
                vals.len() as u64,
                &mut hash_result as *mut _ as *mut u8,
            );
        }
        Hash::new_from_array(hash_result)
    }
}
pub fn hashv ( vals : & [ & [ u8 ] ] ) -> Hash { // Perform the calculation inline, calling this from within a program is // not supported # [ cfg ( not ( target_arch " " ) ) ] { let mut hasher = Hasher :: default ( ) ; hasher . hashv ( vals ) ; hasher . result ( ) } // Call via a system call to perform the calculation # [ cfg ( target_arch " " ) ] { extern " " { fn sol_keccak256 ( vals : * const u8 , val_len : u64 , hash_result : * mut u8 ) -> u64 ; } let mut hash_result = [ 0 ; HASH_BYTES ] ; unsafe { sol_keccak256 ( vals as * const _ as * const u8 , vals . len ( ) as u64 , & mut hash_result as * mut _ as * mut u8 , ) ; } Hash :: new_from_array ( hash_result ) } }
Return a Keccak256 hash for the given data.
Return a Keccak256 hash for the given data .
vals
&[&[u8]]