Function single_block_hash_portable_words

Source
pub fn single_block_hash_portable_words(
    input: &[u32; 16],
    num_bytes: u32,
) -> [u32; 8]
Expand description

Hashing function for at most a single block worth of words using portable implementation.

This API operates on words and is GPU-friendly.

num_bytes specifies how many actual bytes are occupied by useful value in input. Bytes outside that must be set to 0.

NOTE: If unused bytes are not set to 0 or invalid number of bytes is specified, it’ll simply result in invalid hash.

words_from_le_bytes_32(), words_from_le_bytes_64() and le_bytes_from_words_32() can be used to convert bytes to words and back if necessary.