(type egg)
(signature "blake2 egg")
(timestamp 1612269487)
(sxml ((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/blake2" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "egg")) (section 2 "blake2" (toc)) (section 2 "Documentation" (p "Computes BLAKE2 hashes.") (p "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.") (section 4 "Primitives" (def (sig (procedure "(blake2b-primitive #!key length key)" (id blake2b-primitive)) (procedure "(blake2s-primitive #!key length key)" (id blake2s-primitive))) (p "Returns the BLAKE2 checksum digest primitive object.") (p (tt "length") " defaults to the maximum size of the digest and must be an exact quantity and greater than one. " (tt "key") " defaults to " (tt "#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)")))) (section 2 "Usage" (highlight scheme "(use blake2)")) (section 2 "Examples" (highlight scheme "(use blake2 message-digest)\n\n(message-digest-string (blake2b-primitive length: 16) \"abc\")\n ;=> \"cf4ab791c62b8d2b2109c90275287816\"")) (section 2 "Requirements" (p (int-link "message-digest" "message-digest"))) (section 2 "Notes" (ul (li "For use with the " (int-link "message-digest" "message-digest") " extension.") (li "The underlying implementation is the " (link "https://github.com/BLAKE2/BLAKE2/tree/master/ref" "reference") " one that's written in C trading some speed for portability."))) (section 2 "Author" (p (int-link "/users/lemonboy" "LemonBoy"))) (section 2 "Repository" (p (link "https://github.com/LemonBoy/chicken-blake2" "Github")))))
