-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathio.randomseed.utils.auth.pwd.html
More file actions
40 lines (40 loc) · 30.1 KB
/
io.randomseed.utils.auth.pwd.html
File metadata and controls
40 lines (40 loc) · 30.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>io.randomseed.utils.auth.pwd documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script><link rel="stylesheet" type="text/css" href="css/randomseed.css" /></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Random:utils</span> <span class="project-version">2.0.11</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="10_introduction.html"><div class="inner"><span>Introduction</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>io</span></div></div></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>randomseed</span></div></div></li><li class="depth-3"><a href="io.randomseed.utils.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.auth.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>auth</span></div></a></li><li class="depth-5"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>algo</span></div></div></li><li class="depth-6 branch"><a href="io.randomseed.utils.auth.algo.append.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>append</span></div></a></li><li class="depth-6 branch"><a href="io.randomseed.utils.auth.algo.fail.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fail</span></div></a></li><li class="depth-6 branch"><a href="io.randomseed.utils.auth.algo.pbkdf2.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pbkdf2</span></div></a></li><li class="depth-6"><a href="io.randomseed.utils.auth.algo.scrypt.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scrypt</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.utils.auth.locking.html"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>locking</span></div></a></li><li class="depth-5 branch current"><a href="io.randomseed.utils.auth.pwd.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>pwd</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.utils.auth.specs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>specs</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.auth.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bot.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>bot</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.bus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bus</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.crypto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>crypto</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.crypto.codecs.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>codecs</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.db.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>db</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.utils.db.coercion.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>coercion</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.utils.db.sql.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>sql</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.db.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-6 branch"><a href="io.randomseed.utils.db.types.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-6"><a href="io.randomseed.utils.db.types.ip.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.fs.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>fs</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.identity.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>identity</span></div></a></li><li class="depth-5 branch"><a href="io.randomseed.utils.identity.proto.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>proto</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.identity.types.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>types</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.ip.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>ip</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.log.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>log</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.log.logback.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>logback</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.map.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>map</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.nop-cache.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>nop-cache</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.qe.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>qe</span></div></a></li><li class="depth-4"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>reitit</span></div></div></li><li class="depth-5"><a href="io.randomseed.utils.reitit.http.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>http</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.set.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>set</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.time.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>time</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.validators.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>validators</span></div></a></li><li class="depth-5"><a href="io.randomseed.utils.validators.common.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>common</span></div></a></li><li class="depth-4 branch"><a href="io.randomseed.utils.var.html"><div class="inner"><span class="tree" style="top: -52px;"><span class="top" style="height: 61px;"></span><span class="bottom"></span></span><span>var</span></div></a></li><li class="depth-4"><a href="io.randomseed.utils.vec.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vec</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-*default-settings*"><div class="inner"><span>*default-settings*</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-check"><div class="inner"><span>check</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-encrypt"><div class="inner"><span>encrypt</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-expand-settings"><div class="inner"><span>expand-settings</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-find-handler"><div class="inner"><span>find-handler</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-from-json"><div class="inner"><span>from-json</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-generate-salt"><div class="inner"><span>generate-salt</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-human-readable"><div class="inner"><span>human-readable</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-human-readable-chain"><div class="inner"><span>human-readable-chain</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-human-readable-suite"><div class="inner"><span>human-readable-suite</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-init"><div class="inner"><span>init</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-init-wait"><div class="inner"><span>init-wait</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-json-translation"><div class="inner"><span>json-translation</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-json-write-translation"><div class="inner"><span>json-write-translation</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-merge-suites"><div class="inner"><span>merge-suites</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-new-checker"><div class="inner"><span>new-checker</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-new-encryptor"><div class="inner"><span>new-encryptor</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-new-json-checker"><div class="inner"><span>new-json-checker</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-new-json-encryptor"><div class="inner"><span>new-json-encryptor</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-post-parse-json"><div class="inner"><span>post-parse-json</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-pre-generate-json"><div class="inner"><span>pre-generate-json</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-prepare-settings"><div class="inner"><span>prepare-settings</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-printable-suite"><div class="inner"><span>printable-suite</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-salt-bytes"><div class="inner"><span>salt-bytes</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-salt-string"><div class="inner"><span>salt-string</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-shared"><div class="inner"><span>shared</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-shared-chain"><div class="inner"><span>shared-chain</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-shared-suite"><div class="inner"><span>shared-suite</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-split"><div class="inner"><span>split</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-split-chain"><div class="inner"><span>split-chain</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-split-suite"><div class="inner"><span>split-suite</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-standard-check"><div class="inner"><span>standard-check</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-to-json"><div class="inner"><span>to-json</span></div></a></li><li class="depth-1"><a href="io.randomseed.utils.auth.pwd.html#var-wait"><div class="inner"><span>wait</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">io.randomseed.utils.auth.pwd</h1><h4 class="added">added in 2.0.6</h4><div class="doc"><div class="markdown"><p>Random Utilities, authentication, passwords handling.</p>
</div></div><div class="public anchor" id="var-*default-settings*"><h3>*default-settings*</h3><h4 class="dynamic">dynamic</h4><div class="usage"></div><div class="doc"><div class="markdown"><p>Default password authentication timing settings: base wait (seconds), random wait range, and extra delay when user does not exist.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L27">view source</a></div></div><div class="public anchor" id="var-check"><h3>check</h3><div class="usage"><code>(check plain settings shared-suite intrinsic-suite & other-suites)</code><code>(check plain user-suite user-settings)</code></div><div class="doc"><div class="markdown"><p>Checks if the given plain text password is correct by comparing it with the result of calling all checkers in the given encryption suite with memorized options applied.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L250">view source</a></div></div><div class="public anchor" id="var-encrypt"><h3>encrypt</h3><div class="usage"><code>(encrypt plain local-settings)</code></div><div class="doc"><div class="markdown"><p>Encrypts the given plain text password using all encryption functions in the given encryption suite.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L218">view source</a></div></div><div class="public anchor" id="var-expand-settings"><h3>expand-settings</h3><div class="usage"><code>(expand-settings k config)</code></div><div class="doc"><div class="markdown"><p>Returns prepared settings associated with key <code>k</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L547">view source</a></div></div><div class="public anchor" id="var-find-handler"><h3>find-handler</h3><div class="usage"><code>(find-handler password-or-cipher)</code></div><div class="doc"><div class="markdown"><p>Tries to get an encryption handler from an entry map by accessing :handler key or using :handler-id as fallback (and dereferencing it).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L123">view source</a></div></div><div class="public anchor" id="var-from-json"><h3>from-json</h3><div class="usage"><code>(from-json suite)</code><code>(from-json suite tr-map)</code></div><div class="doc"><div class="markdown"><p>Converts JSON data to suite by applying transformations to keys described by tr-map. If no map is given the json-translation is used.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L361">view source</a></div></div><div class="public anchor" id="var-generate-salt"><h3>generate-salt</h3><div class="usage"><code>(generate-salt length possible-chars prefix suffix)</code></div><div class="doc"><div class="markdown"><p>Builds salt bytes from random core with optional <code>prefix</code> and <code>suffix</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L73">view source</a></div></div><div class="public anchor" id="var-human-readable"><h3>human-readable</h3><div class="usage"><code>(human-readable pwd)</code></div><div class="doc"><div class="markdown"><p>Converts binary fields in a crypto entry to string representation.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L426">view source</a></div></div><div class="public anchor" id="var-human-readable-chain"><h3>human-readable-chain</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Alias for <code>human-readable-suite</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L440">view source</a></div></div><div class="public anchor" id="var-human-readable-suite"><h3>human-readable-suite</h3><div class="usage"><code>(human-readable-suite suite)</code></div><div class="doc"><div class="markdown"><p>Converts every entry in suite to human-readable form.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L434">view source</a></div></div><div class="public anchor" id="var-init"><h3>init</h3><div class="usage"><code>(init k config)</code><code>(init k config log-fn)</code></div><div class="doc"><div class="markdown"><p>Initializes password settings from auth config and optional logger.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L529">view source</a></div></div><div class="public anchor" id="var-init-wait"><h3>init-wait</h3><div class="usage"><code>(init-wait {:keys [wait-nouser], pwait :wait, [wmin wmax] :wait-random, :as config})</code></div><div class="doc"><div class="markdown"><p>Initializes wait function and derived wait configuration values.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L464">view source</a></div></div><div class="public anchor" id="var-json-translation"><h3>json-translation</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Translation map for JSON deserialization: converts Base64-encoded fields back to byte arrays and <code>:handler-id</code> to a symbol.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L340">view source</a></div></div><div class="public anchor" id="var-json-write-translation"><h3>json-write-translation</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Translation map for JSON serialization: converts byte-array fields to URL-safe Base64 strings.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L303">view source</a></div></div><div class="public anchor" id="var-merge-suites"><h3>merge-suites</h3><div class="usage"><code>(merge-suites crypto-suites-dual)</code><code>(merge-suites defaults-crypto-suite user-crypto-suite & more)</code></div><div class="doc"><div class="markdown"><p>Merges shared and intrinsic suite chains entry-wise.</p>
<p>Accepts either a <code>Suites</code> value or explicit suite chains.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L134">view source</a></div></div><div class="public anchor" id="var-new-checker"><h3>new-checker</h3><div class="usage"><code>(new-checker settings)</code></div><div class="doc"><div class="markdown"><p>Builds checker function for split suites or separate shared/intrinsic chains.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L494">view source</a></div></div><div class="public anchor" id="var-new-encryptor"><h3>new-encryptor</h3><div class="usage"><code>(new-encryptor settings)</code></div><div class="doc"><div class="markdown"><p>Builds encryptor function returning split shared/intrinsic suites.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L487">view source</a></div></div><div class="public anchor" id="var-new-json-checker"><h3>new-json-checker</h3><div class="usage"><code>(new-json-checker settings)</code></div><div class="doc"><div class="markdown"><p>Builds checker function for JSON-encoded shared and intrinsic suites.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L514">view source</a></div></div><div class="public anchor" id="var-new-json-encryptor"><h3>new-json-encryptor</h3><div class="usage"><code>(new-json-encryptor settings)</code></div><div class="doc"><div class="markdown"><p>Builds encryptor function returning <code>SuitesJSON</code> (shared and intrinsic).</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L505">view source</a></div></div><div class="public anchor" id="var-post-parse-json"><h3>post-parse-json</h3><div class="usage"><code>(post-parse-json tr-map m)</code></div><div class="doc"><div class="markdown"><p>Post-parses JSON data by transforming certain values with the given translation map.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L350">view source</a></div></div><div class="public anchor" id="var-pre-generate-json"><h3>pre-generate-json</h3><div class="usage"><code>(pre-generate-json tr-map m)</code></div><div class="doc"><div class="markdown"><p>Prepares suite entry for JSON serialization using translation map <code>tr-map</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L312">view source</a></div></div><div class="public anchor" id="var-prepare-settings"><h3>prepare-settings</h3><div class="usage"><code>(prepare-settings config)</code></div><div class="doc"><div class="markdown"><p>Merges provided settings with defaults and removes empty values.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L446">view source</a></div></div><div class="public anchor" id="var-printable-suite"><h3>printable-suite</h3><div class="usage"><code>(printable-suite suite)</code></div><div class="doc"><div class="markdown"><p>Returns normalized printable handler names from a suite definition.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L374">view source</a></div></div><div class="public anchor" id="var-salt-bytes"><h3>salt-bytes</h3><div class="usage"><code>(salt-bytes)</code><code>(salt-bytes size)</code></div><div class="doc"><div class="markdown"><p>Generates cryptographically strong random salt bytes.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L51">view source</a></div></div><div class="public anchor" id="var-salt-string"><h3>salt-string</h3><div class="usage"><code>(salt-string length possible-chars)</code></div><div class="doc"><div class="markdown"><p>Generates random salt string of <code>length</code> from <code>possible-chars</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L61">view source</a></div></div><div class="public anchor" id="var-shared"><h3>shared</h3><div class="usage"><code>(shared crypto-entry)</code></div><div class="doc"><div class="markdown"><p>Extracts shared part of a single crypto entry.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L380">view source</a></div></div><div class="public anchor" id="var-shared-chain"><h3>shared-chain</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Alias for <code>shared-suite</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L398">view source</a></div></div><div class="public anchor" id="var-shared-suite"><h3>shared-suite</h3><div class="usage"><code>(shared-suite suite)</code></div><div class="doc"><div class="markdown"><p>Extracts shared parts for all entries in <code>suite</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L392">view source</a></div></div><div class="public anchor" id="var-split"><h3>split</h3><div class="usage"><code>(split crypto-entry)</code></div><div class="doc"><div class="markdown"><p>Splits a cipher entry or a password into two parts and returns a Suite record with two fields <code>:shared</code> and <code>:intrinsic</code> with these parts.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L400">view source</a></div></div><div class="public anchor" id="var-split-chain"><h3>split-chain</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Alias for <code>split-suite</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L424">view source</a></div></div><div class="public anchor" id="var-split-suite"><h3>split-suite</h3><div class="usage"><code>(split-suite suite)</code></div><div class="doc"><div class="markdown"><p>Splits all entries in suite into <code>Suites</code> with shared/intrinsic chains.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L408">view source</a></div></div><div class="public anchor" id="var-standard-check"><h3>standard-check</h3><div class="usage"><code>(standard-check encrypt-fn plain encrypted salt settings)</code><code>(standard-check encrypt-fn plain opts encrypted salt settings)</code><code>(standard-check encrypt-fn plain opts-or-enc settings)</code></div><div class="doc"><div class="markdown"><p>Performs a standard authentication check based on the provided plain text password given as the second argument). The first argument should be an encryption function used to perform the encryption operation on the provided password and compare the result with the encrypted password that should be provided as third argument or as a value associated with the :password key if this argument is a map. The last argument should be settings map that will be passed to the encryption function.</p>
<p>This is a low-level function that is intended to be used by different authentication modules which are implementing pretty standard way of checking the password.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L88">view source</a></div></div><div class="public anchor" id="var-to-json"><h3>to-json</h3><div class="usage"><code>(to-json suite)</code><code>(to-json suite tr-map)</code></div><div class="doc"><div class="markdown"><p>Converts the given suite to JSON format.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L322">view source</a></div></div><div class="public anchor" id="var-wait"><h3>wait</h3><div class="usage"><code>(wait wait-start wait-randmax)</code></div><div class="doc"><div class="markdown"><p>Sleeps for <code>wait-start</code> seconds plus random delay up to <code>wait-randmax</code>.</p>
</div></div><div class="src-link"><a href="https://github.com/randomseed-io/utils/tree/2.0.11/modules/auth/src/io/randomseed/utils/auth/pwd.clj#L39">view source</a></div></div></div></body></html>