Low-level crypto utils. Private & alpha, very likely to change!
Low-level crypto utils. Private & alpha, very likely to change!
Default CipherKit for AES CBC
Default CipherKit for AES CBC
Default CipherKit for AES GCM
Default CipherKit for AES GCM
(decrypt {:keys [cipher-kit salt-size salt->key-fn enc-ba]
:or {cipher-kit cipher-kit-aes-gcm}})
(encrypt {:keys [cipher-kit ?salt-ba key-ba plain-ba rand-bytes-fn]
:or {cipher-kit cipher-kit-aes-gcm rand-bytes-fn rand-bytes}})
(get-cipher _)
Returns a thread-safe javax.crypto.Cipher
instance.
Returns a thread-safe `javax.crypto.Cipher` instance.
(get-iv-size _)
Returns necessary iv-ba length.
Returns necessary iv-ba length.
(get-key-spec _ ba)
Returns a javax.crypto.spec.SecretKeySpec
.
Returns a `javax.crypto.spec.SecretKeySpec`.
(get-param-spec _ iv-ba)
Returns a java.security.spec.AlgorithmParameters
.
Returns a `java.security.spec.AlgorithmParameters`.
(sha512-key-ba ?salt-ba utf8-or-ba)
(sha512-key-ba ?salt-ba utf8-or-ba n-rounds)
SHA512-based key generator. Good JVM availability without extra dependencies (PBKDF2, bcrypt, scrypt, etc.). Decent security when using many rounds.
SHA512-based key generator. Good JVM availability without extra dependencies (PBKDF2, bcrypt, scrypt, etc.). Decent security when using many rounds.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close