blake2

  1. blake2
  2. Documentation
    1. Primitives
  3. Usage
  4. Examples
  5. Requirements
  6. Notes
  7. Author
  8. Repository

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

[procedure] (blake2b-primitive #!key length key)
[procedure] (blake2s-primitive #!key length key)

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

message-digest

Notes

Author

LemonBoy

Repository

Github