Hash
Hash implements
hash : hasher, a -> hasher
where a implements Hash, hasher implements Hasher
A value that can be hashed.
Hasher implements
add_bytes : a, List U8 -> a
where a implements Hasher
add_u8 : a, U8 -> a
where a implements Hasher
add_u16 : a, U16 -> a
where a implements Hasher
add_u32 : a, U32 -> a
where a implements Hasher
add_u64 : a, U64 -> a
where a implements Hasher
add_u128 : a, U128 -> a
where a implements Hasher
complete : a -> U64
where a implements Hasher
Describes a hashing algorithm that is fed bytes and produces an integer hash.
The Hasher
ability describes general-purpose hashers. It only allows
emission of 64-bit unsigned integer hashes. It is not suitable for
cryptographically-secure hashing.
hash_str_bytes
Adds a string into a Hasher
by hashing its UTF-8 bytes.
hash_list
Adds a list of Hash
able elements to a Hasher
by hashing each element.
hash_bool : a, Bool -> a
where a implements Hasher
Adds a single Bool
to a hasher.
hash_i8 : a, I8 -> a
where a implements Hasher
Adds a single I8 to a hasher.
hash_i16 : a, I16 -> a
where a implements Hasher
Adds a single I16 to a hasher.
hash_i32 : a, I32 -> a
where a implements Hasher
Adds a single I32 to a hasher.
hash_i64 : a, I64 -> a
where a implements Hasher
Adds a single I64 to a hasher.
hash_i128 : a, I128 -> a
where a implements Hasher
Adds a single I128 to a hasher.
hash_dec : a, Dec -> a
where a implements Hasher
Adds a single Dec
to a hasher.
hash_unordered
Adds a container of Hash
able elements to a Hasher
by hashing each element.
The container is iterated using the walk method passed in.
The order of the elements does not affect the final hash.