Message digest algorithms for Clojure
Message digest algorithms for Clojure
(algorithm? algorithm)Returns true if algorithm is supported by the current JVM.
Returns true if algorithm is supported by the current JVM.
(algorithms)List supported digest algorithms.
List supported digest algorithms.
(bytes->hex bytes)Returns a lowercase hexadecimal string for byte array, or nil for nil.
Returns a lowercase hexadecimal string for byte array, or nil for nil.
(digest algorithm message)(digest algorithm message encoding)Returns digest for message with given algorithm.
Returns digest for message with given algorithm.
(digest! context)Finalize a digest or HMAC context and return its bytes.
Finalize a digest or HMAC context and return its bytes.
(digest-base64 algorithm message)(digest-base64 algorithm message encoding)Returns base64-encoded digest for message with given algorithm.
Returns base64-encoded digest for message with given algorithm.
(digest-bytes algorithm message)(digest-bytes algorithm message encoding)Returns digest bytes for message with given algorithm.
Returns digest bytes for message with given algorithm.
(digest-context algorithm)(digest-context algorithm encoding)Create a stateful digest context for algorithm.
Create a stateful digest context for algorithm.
(-update-digest! message algorithm encoding)(-update-mac! message mac encoding)(file-digest algorithm file)Returns digest for file with given algorithm.
Returns digest for file with given algorithm.
(file-sha-256 file)Returns SHA-256 digest for file.
Returns SHA-256 digest for file.
(hex->bytes hex)Returns bytes for a hexadecimal string, or nil for nil.
Hexadecimal input is case-insensitive and must contain an even number of valid hexadecimal characters.
Returns bytes for a hexadecimal string, or nil for nil. Hexadecimal input is case-insensitive and must contain an even number of valid hexadecimal characters.
(hmac algorithm key message)(hmac algorithm key message encoding)Returns hex-encoded HMAC for message with given HMAC algorithm and key.
Returns hex-encoded HMAC for message with given HMAC algorithm and key.
(hmac-base64 algorithm key message)(hmac-base64 algorithm key message encoding)Returns base64-encoded HMAC for message with given HMAC algorithm and key.
Returns base64-encoded HMAC for message with given HMAC algorithm and key.
(hmac-bytes algorithm key message)(hmac-bytes algorithm key message encoding)Returns HMAC bytes for message with given HMAC algorithm and key.
Returns HMAC bytes for message with given HMAC algorithm and key.
(hmac-context algorithm key)(hmac-context algorithm key encoding)Create a stateful HMAC context for algorithm and key.
Create a stateful HMAC context for algorithm and key.
(hmac-sha-256 key message)Returns hex-encoded HMAC-SHA-256 for message and key.
Returns hex-encoded HMAC-SHA-256 for message and key.
(hmac-sha1 key message)Returns hex-encoded HMAC-SHA-1 for message and key.
Returns hex-encoded HMAC-SHA-1 for message and key.
(hmac-sha3-224 key message)Returns hex-encoded HMAC-SHA3-224 for message and key.
Returns hex-encoded HMAC-SHA3-224 for message and key.
(hmac-sha3-256 key message)Returns hex-encoded HMAC-SHA3-256 for message and key.
Returns hex-encoded HMAC-SHA3-256 for message and key.
(hmac-sha3-384 key message)Returns hex-encoded HMAC-SHA3-384 for message and key.
Returns hex-encoded HMAC-SHA3-384 for message and key.
(hmac-sha3-512 key message)Returns hex-encoded HMAC-SHA3-512 for message and key.
Returns hex-encoded HMAC-SHA3-512 for message and key.
(hmac-sha384 key message)Returns hex-encoded HMAC-SHA-384 for message and key.
Returns hex-encoded HMAC-SHA-384 for message and key.
(hmac-sha512 key message)Returns hex-encoded HMAC-SHA-512 for message and key.
Returns hex-encoded HMAC-SHA-512 for message and key.
(-context-encoding context)(-finalize-context! context)(-reset-context! context)(-update-context! context message encoding)(md2 message)Encode the given message with the MD2 algorithm.
Encode the given message with the MD2 algorithm.
(md5 message)Encode the given message with the MD5 algorithm.
Encode the given message with the MD5 algorithm.
(reset! context)Reset a digest or HMAC context, returning the context.
Reset a digest or HMAC context, returning the context.
(secure-eq? a b)(secure-eq? a b encoding)Constant-time equality for digest or HMAC byte arrays.
With a third argument of :hex or :base64, decodes two digest strings
before comparing their bytes. Use this for secret or attacker-controlled
digest/signature verification instead of = to avoid timing side channels.
Constant-time equality for digest or HMAC byte arrays. With a third argument of `:hex` or `:base64`, decodes two digest strings before comparing their bytes. Use this for secret or attacker-controlled digest/signature verification instead of `=` to avoid timing side channels.
(sha message)Encode the given message with the SHA algorithm.
Encode the given message with the SHA algorithm.
(sha-1 message)Encode the given message with the SHA-1 algorithm.
Encode the given message with the SHA-1 algorithm.
(sha-224 message)Encode the given message with the SHA-224 algorithm.
Encode the given message with the SHA-224 algorithm.
(sha-256 message)Encode the given message with the SHA-256 algorithm.
Encode the given message with the SHA-256 algorithm.
(sha-384 message)Encode the given message with the SHA-384 algorithm.
Encode the given message with the SHA-384 algorithm.
(sha-512 message)Encode the given message with the SHA-512 algorithm.
Encode the given message with the SHA-512 algorithm.
(sha1 message)Encode the given message with the SHA1 algorithm.
Encode the given message with the SHA1 algorithm.
(sha224 message)Encode the given message with the SHA224 algorithm.
Encode the given message with the SHA224 algorithm.
(sha256 message)Encode the given message with the SHA256 algorithm.
Encode the given message with the SHA256 algorithm.
(sha3-224 message)Encode the given message with the SHA3-224 algorithm.
Encode the given message with the SHA3-224 algorithm.
(sha3-256 message)Encode the given message with the SHA3-256 algorithm.
Encode the given message with the SHA3-256 algorithm.
(sha3-384 message)Encode the given message with the SHA3-384 algorithm.
Encode the given message with the SHA3-384 algorithm.
(sha3-512 message)Encode the given message with the SHA3-512 algorithm.
Encode the given message with the SHA3-512 algorithm.
(sha384 message)Encode the given message with the SHA384 algorithm.
Encode the given message with the SHA384 algorithm.
(sha512 message)Encode the given message with the SHA512 algorithm.
Encode the given message with the SHA512 algorithm.
(shake128 message)Encode the given message with the SHAKE128 algorithm.
Encode the given message with the SHAKE128 algorithm.
(shake128-256 message)Encode the given message with the SHAKE128-256 algorithm.
Encode the given message with the SHAKE128-256 algorithm.
(shake256 message)Encode the given message with the SHAKE256 algorithm.
Encode the given message with the SHAKE256 algorithm.
(shake256-512 message)Encode the given message with the SHAKE256-512 algorithm.
Encode the given message with the SHAKE256-512 algorithm.
Standard digest algorithms with statically generated convenience functions.
Standard digest algorithms with statically generated convenience functions.
(update! context message)(update! context message encoding)Update a digest or HMAC context with message, returning the context.
Update a digest or HMAC context with message, returning the context.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |