Outdated egg!
This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
blake2
TOC »
Documentation
Computes BLAKE2 hashes.
BLAKE2 is a cryptographic hash function that comes in two flavours, BLAKE2B (producing digests with size up to 64 bytes) and BLAKE2S (producing digests with size up to 32 bytes), that's reasonably fast and also provides a keyed mode so it can also be used as a cheap replacement for HMAC.
Primitives
- blake2b-primitive #!key length keyprocedure
- blake2s-primitive #!key length keyprocedure
Returns the BLAKE2 checksum digest primitive object.
length defaults to the maximum size of the digest and must be an exact quantity and greater than one. key defaults to #f, if you want to use the hash in the keyed mode you only have to supply a blob or a string whose size is greater than one and less than the hard limit for the given hash function (that is 64 bytes for BLAKE2B and 32 bytes for BLAKE2s)
Usage
(use blake2)
Examples
(use blake2 message-digest) (message-digest-string (blake2b-primitive length: 16) "abc") ;=> "cf4ab791c62b8d2b2109c90275287816"
Requirements
Notes
- For use with the message-digest extension.
- The underlying implementation is the reference one that's written in C trading some speed for portability.