The following hash functions are provided by this namespace:
The following hash functions are provided by this namespace: - md5 - sha1 - sha256 - sha512 - 'www-form-urlencoded' encoding scheme: form-encode and form-decode - base64 - aes (requires unlimited JCE extension for JVM, see http://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters/6481658#6481658
(aes-decrypt encrypted password & [{:keys [as-hex]}])
DEPRECATED: Use 'decrypt-aes' instead.
Decrypt an encrypted text encrypted with aes-encrypt
. May throw
exception on failure or password error. For HEX encoded input,
set :as-hex to true.
DEPRECATED: Use 'decrypt-aes' instead. Decrypt an encrypted text encrypted with `aes-encrypt`. May throw exception on failure or password error. For HEX encoded input, set :as-hex to true.
(aes-encrypt plaintext password & [{:keys [outpath as-hex]}])
DEPRECATED: Use 'encrypt-aes' instead.
AES encryption. Returning a base64 or hex string. Write
to outpath
is specified.
DEPRECATED: Use 'encrypt-aes' instead. AES encryption. Returning a base64 or hex string. Write to `outpath` is specified.
(aes-encrypt-binary plaintext password)
Encrypt plaintext with the password, returns a byte-array. May throw exception on failure
Encrypt plaintext with the password, returns a byte-array. May throw exception on failure
Base64 encode a string or byte array. Available options: :url-safe? :as-bytes?
Base64 encode a string or byte array. Available options: :url-safe? :as-bytes?
(base64-decode x & options)
Available options:as-bytes?
Available options:as-bytes?
(base64-decode-bs bs & {:keys [as-bytes?]})
Decode a base64 encoded string or bytes
Decode a base64 encoded string or bytes
(base64-encode x & options)
Available options: :url-safe? :as-bytes?
Available options: :url-safe? :as-bytes?
(base64-encode-bytes bs & {:keys [url-safe? as-bytes?] :or {url-safe? true}})
Returns a base64 encoded string. If url-safe?
is not-nil,
using a URL-safe variation of the base64 algorithm
Returns a base64 encoded string. If `url-safe?` is not-nil, using a URL-safe variation of the base64 algorithm
Defines form-encode and form-decode methods for url-safe encode and decode string/bytes/input streams.
Defines form-encode and form-decode methods for url-safe encode and decode string/bytes/input streams.
(-base64-decode this options)
(-base64-encode this options)
(compress-string in)
Compress a string using gzip, return the base64 encoded bytes
Compress a string using gzip, return the base64 encoded bytes
(decompress-string in)
Decompress a string compressed by compress-string
Decompress a string compressed by compress-string
(decrypt-aes encrypted password)
Decrypt an encrypted
string or byte-array using the provided password
Decrypt an `encrypted` string or byte-array using the provided `password`
(digest alg in)
(digest-with alg in & {:keys [as-bytes?]})
Digest with the specified algorithm. If as-bytes?
is true, returns a byte array intead of string.
Supported algorithms: md2, md5, sha1, sha256, sha512
Digest with the specified algorithm. If `as-bytes?` is true, returns a byte array intead of string. Supported algorithms: md2, md5, sha1, sha256, sha512
(encrypt-aes plaintext password)
Encrypt plaintext with the password
Encrypt plaintext with the password
(form-decode s & options)
URL decode a string as bytes(:as-bytes?) or utf8 encoded string
URL decode a string as bytes(:as-bytes?) or utf8 encoded string
(form-encode s & options)
URL Encode a string as bytes(:as-bytes?) or utf8 encoded string
URL Encode a string as bytes(:as-bytes?) or utf8 encoded string
(md2 & args)
(md5 & args)
(rand-str & [n])
Generate a random alpha-numeric string with length n
Generate a random alpha-numeric string with length n
(sha1 & args)
(sha256 & args)
(sha512 & args)
(slow= sa sb)
Slow equals compare. Takes string or byte array as arugments.
see https://crackstation.net/hashing-security.htm#javasourcecode
Slow equals compare. Takes string or byte array as arugments. see https://crackstation.net/hashing-security.htm#javasourcecode
(url-decode bs & {:keys [as-bytes?]})
URL decode input byte array as a string, or if as-bytes? is true, as byte-array
URL decode input byte array as a string, or if as-bytes? is true, as byte-array
(url-encode bs & {:keys [as-bytes?]})
URL encode input byte array as a utf8-encoded string, or if as-bytes? is true, as byte-array
URL encode input byte array as a utf8-encoded string, or if as-bytes? is true, as byte-array
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close