Version: 5.2
SHA-2
SHA-2 family of functions modelled after the openssl/sha1 module.
(require (planet mordae/sha2:1:2)) |
(sha224-bytes in) → bytes? in : input-port?
Returns 28-byte string that represents SHA-2 224-bit variant hash of the
content from in, consuming all of the input from in until
an end-of-file.
(sha256-bytes in) → bytes? in : input-port?
Returns 32-byte string that represents SHA-2 256-bit variant hash of the
content from in, consuming all of the input from in until
an end-of-file.
(sha512-bytes in) → bytes? in : input-port?
Returns 64-byte string that represents SHA-2 512-bit variant hash of the
content from in, consuming all of the input from in until
an end-of-file.
(sha224 in) → string? in : input-port?
Returns a 56-character string that represents SHA-2 224-bit variant hash
(in hexadecimal notation) of the content from in, consuming all of
the input from in until an end-of-file.
(sha256 in) → string? in : input-port?
Returns a 64-character string that represents SHA-2 256-bit variant hash
(in hexadecimal notation) of the content from in, consuming all of
the input from in until an end-of-file.
(sha512 in) → string? in : input-port?
Returns a 128-character string that represents SHA-2 512-bit variant hash
(in hexadecimal notation) of the content from in, consuming all of
the input from in until an end-of-file.
(bytes->sha224 bstr) → string? bstr : bytes?
Returns a 56-character string that represents SHA-2 224-bit variant hash
(in hexadecimal notation) of the given byte string bstr.
(bytes->sha256 bstr) → string? bstr : bytes?
Returns a 64-character string that represents SHA-2 256-bit variant hash
(in hexadecimal notation) of the given byte string bstr.
(bytes->sha512 bstr) → string? bstr : bytes?
Returns a 128-character string that represents SHA-2 512-bit variant hash
(in hexadecimal notation) of the given byte string bstr.
(string->sha224/utf-8 str) → string? str : string?
Returns a 56-character string that represents SHA-2 224-bit variant hash
(in hexadecimal notation) of the given string str as if it were an
UTF-8 encoded byte string.
(string->sha256/utf-8 str) → string? str : string?
Returns a 64-character string that represents SHA-2 256-bit variant hash
(in hexadecimal notation) of the given string str as if it were an
UTF-8 encoded byte string.
(string->sha512/utf-8 str) → string? str : string?
Returns a 128-character string that represents SHA-2 512-bit variant hash
(in hexadecimal notation) of the given string str as if it were an
UTF-8 encoded byte string.