Liking cljdoc? Tell your friends :D

io.randomseed.utils.crypto

Random utilities, crypto support functions.

Random utilities, crypto support functions.
raw docstring

ask-keyclj

(ask-key & {:as opts})

Ask user for a key with confirmation. Repeats until two keys are the same and are not empty. Keyword arguments can be given to configure behavior: prompt (message displayed when asking for first key), confirm-prompt (message displayed when asking for the same key again), not-match-msg (message displayed when keys do not match), empty-msg (message displayed when the entered key is empty), retries (number of retries before quitting the loop; when set to nil or not given, it will continue indefinitely), confirmation? (requires key to be re-entered for confirmation, defaults to true), allow-empty? (allows the entered key to be an empty string; defaults to false), empty-nil? (returns nil instead of an empty string when on empty key; defaults to false), empty-quits? (short-circuits on any empty key and returns nil; defaults to false), empty-quits-nil? (returns nil when quitting on empty key; defaults to true). Returns the entered key or nil.

Ask user for a key with confirmation. Repeats until two keys are the same
and are not empty. Keyword arguments can be given to configure behavior:
`prompt` (message displayed when asking for first key),
`confirm-prompt` (message displayed when asking for the same key again),
`not-match-msg` (message displayed when keys do not match),
`empty-msg` (message displayed when the entered key is empty),
`retries` (number of retries before quitting the loop; when set to `nil` or not
given, it will continue indefinitely),
`confirmation?` (requires key to be re-entered for confirmation, defaults to `true`),
`allow-empty?` (allows the entered key to be an empty string; defaults to `false`),
`empty-nil?` (returns `nil` instead of an empty string when on empty key; defaults to `false`),
`empty-quits?` (short-circuits on any empty key and returns `nil`; defaults to `false`),
`empty-quits-nil?` (returns `nil` when quitting on empty key; defaults to `true`).
Returns the entered key or `nil`.
sourceraw docstring

ask-passclj

(ask-pass & {:as opts})

Ask user for a password with confirmation. Repeats until two passwords are the same and are not empty. Keyword arguments can be given to configure behavior: prompt (message displayed when asking for first password), confirm-prompt (message displayed when asking for the same password again), not-match-msg (message displayed when passwords do not match), empty-msg (message displayed when the entered password is empty), retries (number of retries before quitting the loop; when set to nil or not given, it will continue indefinitely), confirmation? (requires password to be re-entered for confirmation, defaults to true), allow-empty? (allows the entered password to be an empty string; defaults to false), empty-nil? (returns nil instead of an empty string when on empty password; defaults to false), empty-quits? (short-circuits on any empty password and returns nil; defaults to false), empty-quits-nil? (returns nil when quitting on empty password; defaults to true). Returns the entered password or nil.

Ask user for a password with confirmation. Repeats until two passwords are the same
and are not empty. Keyword arguments can be given to configure behavior:
`prompt` (message displayed when asking for first password),
`confirm-prompt` (message displayed when asking for the same password again),
`not-match-msg` (message displayed when passwords do not match),
`empty-msg` (message displayed when the entered password is empty),
`retries` (number of retries before quitting the loop; when set to `nil` or not
given, it will continue indefinitely),
`confirmation?` (requires password to be re-entered for confirmation, defaults to `true`),
`allow-empty?` (allows the entered password to be an empty string; defaults to `false`),
`empty-nil?` (returns `nil` instead of an empty string when on empty password; defaults to `false`),
`empty-quits?` (short-circuits on any empty password and returns `nil`; defaults to `false`),
`empty-quits-nil?` (returns `nil` when quitting on empty password; defaults to `true`).
Returns the entered password or `nil`.
sourceraw docstring

decrypt-keyclj

(decrypt-key m password)
(decrypt-key encrypted salt password)
source

decrypt-key-binclj

(decrypt-key-bin [iv-bin encrypted-bin] pwd-bin)
source

decrypt-key-coreclj

(decrypt-key-core encrypted k iv)
source

encrypt-keyclj

(encrypt-key k password)

Encrypts private key using random IV and the given password. Returns base64-encoded map of two keys.

Encrypts private key using random IV and the given password. Returns base64-encoded
map of two keys.
sourceraw docstring

key->binclj

(key->bin v)
source

pwd->binclj

(pwd->bin v)
source

read-keyclj

(read-key)
(read-key prompt)
source

read-pwdclj

(read-pwd)
(read-pwd prompt)
source

salt->binclj

(salt->bin v)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close