Skip to main content

slice_to_hash

Function slice_to_hash 

Source
pub fn slice_to_hash(slice: &[u8]) -> Result<HashValue, ScriptError>
Expand description

Convert a slice into a HashValue.

Returns ScriptError::InvalidData if the slice is not exactly 32 bytes long.