Function ssb_validate::utils::multihash_from_bytes[][src]

pub fn multihash_from_bytes(bytes: &[u8]) -> Multihash

Generate a hash for a given message value.

The message value is expected to be provided in the form of a byte array. The string of the bytes is first encoded to UTF-16 before the hash is computed. Note that the hash is this case is sometimes referred to as a key (as in, KVT - key, value, timestamp) or as a Multihash. More information can be found in the Multihash documentation.