Files
tauri-forage/docs/cryptoForage.html
Daniel Thompson-Yvetot 2c10c1c2ff fix(typo): in docs
2020-01-26 21:07:48 +01:00

757 lines
12 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: cryptoForage</title>
<script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
<script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
<script src="./build/entry.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="https://fonts.googleapis.com/css?family=Muli:100,400,700|Oswald:300|Inconsolata,700" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
<link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
</head>
<body>
<div id="stickyNavbarOverlay"></div>
<div class="top-navbar">
<div class="container">
<nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand">
<h1 class="navbar-item">tauri-forage Documentation</h1>
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
</nav>
</div>
</div>
<div class="container">
<div class="columns">
<div class="column is-3" id="sidebarNav">
<div class="sidebar">
<nav>
<h2><a href="index.html">Home</a></h2><div class="category"></div><div class="category"><h2>crypto</h2><h3>Namespaces</h3><ul><li><a href="crypto.html">crypto</a></li><li><a href="crypto.box.html">box</a></li><li><a href="crypto.secretBox.html">secretBox</a></li></ul></div><div class="category"><h2>forage</h2><h3>Namespaces</h3><ul><li><a href="cryptoForage.html">cryptoForage</a></li><li><a href="forage.html">forage</a></li></ul></div><div class="category"><h2>handler</h2><h3>Namespaces</h3><ul><li><a href="handler.html">handler</a></li></ul></div>
</nav>
</div>
</div>
<div class="column is-9-desktop">
<div class="content" id="main-content-wrapper">
<header class="page-title">
<p>Namespace</p>
<h1>cryptoForage</h1>
</header>
<section>
<header>
<h2>cryptoForage</h2>
</header>
<article>
<div class="container-overview">
<div class="description"><script type="text/javascript" src="https://unpkg.com/mermaid@7.1.0/dist/mermaid.min.js"></script><p>Use currying process to inject</p></div>
<dl class="details">
<p class="tag-source">
<a href="cryptoForage.esm.js.html" class="button">View Source</a>
<span>
<a href="cryptoForage.esm.js.html">cryptoForage.esm.js</a>, <a href="cryptoForage.esm.js.html#line12">line 12</a>
</span>
</p>
</dl>
</div>
<div class='vertical-section'>
<h3 class="title"><span>Methods</span></h3>
<div class="members">
<div class="member">
<h4 class="name" id=".deBox">
<a class="href-link" href="#.deBox">#</a>
<span class='tag'>static</span>
<span class="code-name">
deBox<span class="signature">(key, model, maxlen, row, name, logger, returner)</span><span class="type-signature"> &rarr; {object|*}</span>
</span>
</h4>
<div class="description">
<script type="text/javascript" src="https://unpkg.com/mermaid@7.1.0/dist/mermaid.min.js"></script><p>use the &quot;box&quot; system to decrypt something from the storage</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>encryption key</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>model</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last"><p>array of acceptable properties (validate)</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>maxlen</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>forage name of key (validate)</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>row</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>forage row (forage)</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>forage name of key (forage)</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>logger</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>loglevel of errors (forage)</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>returner</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>return type (forage)</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<p class="tag-source">
<a href="cryptoForage.esm.js.html" class="button">View Source</a>
<span>
<a href="cryptoForage.esm.js.html">cryptoForage.esm.js</a>, <a href="cryptoForage.esm.js.html#line55">line 55</a>
</span>
</p>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>Returns:</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><ul>
<li>the JSON results of our box</li>
</ul></div>
<div class='column is-5 has-text-left'>
<label>Type: </label>
<span class="param-type">object</span>
|
<span class="param-type">*</span>
</div>
</div>
</div>
</div>
<h5>Example</h5>
<pre class="prettyprint"><code>const curry = async function (val) {
const box = await crypto.secretBox.encrypt({
json: val,
key: key
})
console.log(box)
return box
}</code></pre>
</div>
<div class="member">
<h4 class="name" id=".enBox">
<a class="href-link" href="#.enBox">#</a>
<span class='tag'>static</span>
<span class="code-name">
enBox<span class="signature">(key, logger, returner)</span><span class="type-signature"> &rarr; {object|*}</span>
</span>
</h4>
<div class="description">
<script type="text/javascript" src="https://unpkg.com/mermaid@7.1.0/dist/mermaid.min.js"></script><p>encrypt a functional</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr class="deep-level-0">
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>encryption key</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>logger</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last"><p>loglevel of errors (forage)</p></td>
</tr>
<tr class="deep-level-0">
<td class="name"><code>returner</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last"><p>return type (forage)</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<p class="tag-source">
<a href="cryptoForage.esm.js.html" class="button">View Source</a>
<span>
<a href="cryptoForage.esm.js.html">cryptoForage.esm.js</a>, <a href="cryptoForage.esm.js.html#line13">line 13</a>
</span>
</p>
</dl>
<div class='columns method-parameter'>
<div class="column is-2"><label>Returns:</label></div>
<div class="column is-10">
<div class="columns">
<div class='param-desc column is-7'><ul>
<li>the JSON results of our box</li>
</ul></div>
<div class='column is-5 has-text-left'>
<label>Type: </label>
<span class="param-type">object</span>
|
<span class="param-type">*</span>
</div>
</div>
</div>
</div>
<h5>Example</h5>
<pre class="prettyprint"><code>const boxFn = await cryptoForage.enBox({
key:key,
loggerType: 'throw',
returnType: 7
})(new Date().now())</code></pre>
</div>
</div>
</div>
</article>
</section>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="content has-text-centered">
<p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.3</a></p>
<p class="sidebar-created-by">
<a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
<a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
</p>
</div>
</footer>
<script src="scripts/app.min.js"></script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>