hash/bytes hash/bytes-max hash/bytes-min hash/context-bytes hash/final hash/hash hash/key-bytes hash/keygen hash/new-state hash/update
32
Number of bytes in a generic, simple hash.
65535
Maximum number of bytes allowed when creating a keyed hash.
16
Minimum number of bytes allowed when creating a keyed hash.
8
Number of bytes required in context buffer for hashing.
(hash/final state len)
Get the final hash after digesting all of the input as a string. The resulting hash will be a string of length len.
(hash/hash size input ctx &opt key)
Hash some input bytes into an output string of length size. Optionally provide a key that can be used to generate different hashes on the same input.
32
Number of bytes in a key required for hashing.
(hash/keygen &opt buf)
Generate a key suitable for use in hashing. The key is a buffer of at least 32 bytes. If a buffer buf is provided, the first 32 bytes of buf will be set to a new random key. Returns a key buffer.
(hash/new-state ctx key)
Create a new hash-state. Takes a context ctx and a key and returns a new abstract type, jhydro/hash-state. Both ctx and key should be byte sequences, of at least lengths 8 and 32 respectively. Returns the new state.
(hash/update state bytes)
Add more bytes to the hash state. Returns the modified state