-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
./docs
- Loading branch information
There are no files selected for viewing
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,297 @@ | ||
<!doctype html> | ||
<html class="default no-js"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<title>Symmetric | @nthparty/bcl</title> | ||
<meta name="description" content="Documentation for @nthparty/bcl"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="../assets/css/main.css"> | ||
</head> | ||
<body> | ||
<header> | ||
<div class="tsd-page-toolbar"> | ||
<div class="container"> | ||
<div class="table-wrap"> | ||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base=".."> | ||
<div class="field"> | ||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label> | ||
<input id="tsd-search-field" type="text" /> | ||
</div> | ||
<ul class="results"> | ||
<li class="state loading">Preparing search index...</li> | ||
<li class="state failure">The search index is not available</li> | ||
</ul> | ||
<a href="../index.html" class="title">@nthparty/bcl</a> | ||
</div> | ||
<div class="table-cell" id="tsd-widgets"> | ||
<div id="tsd-filter"> | ||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a> | ||
<div class="tsd-filter-group"> | ||
<div class="tsd-select" id="tsd-filter-visibility"> | ||
<span class="tsd-select-label">All</span> | ||
<ul class="tsd-select-list"> | ||
<li data-value="public">Public</li> | ||
<li data-value="protected">Public/Protected</li> | ||
<li data-value="private" class="selected">All</li> | ||
</ul> | ||
</div> | ||
<input type="checkbox" id="tsd-filter-inherited" checked /> | ||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label> | ||
<input type="checkbox" id="tsd-filter-externals" checked /> | ||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label> | ||
<input type="checkbox" id="tsd-filter-only-exported" /> | ||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label> | ||
</div> | ||
</div> | ||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="tsd-page-title"> | ||
<div class="container"> | ||
<ul class="tsd-breadcrumb"> | ||
<li> | ||
<a href="../globals.html">Globals</a> | ||
</li> | ||
<li> | ||
<a href="../modules/_bcl_.html">"bcl"</a> | ||
</li> | ||
<li> | ||
<a href="_bcl_.symmetric.html">Symmetric</a> | ||
</li> | ||
</ul> | ||
<h1>Class Symmetric</h1> | ||
</div> | ||
</div> | ||
</header> | ||
<div class="container container-main"> | ||
<div class="row"> | ||
<div class="col-8 col-content"> | ||
<section class="tsd-panel tsd-comment"> | ||
<div class="tsd-comment tsd-typography"> | ||
<div class="lead"> | ||
<p>Symmetric (i.e., secret-key) encryption/decryption primitives.</p> | ||
</div> | ||
</div> | ||
</section> | ||
<section class="tsd-panel tsd-hierarchy"> | ||
<h3>Hierarchy</h3> | ||
<ul class="tsd-hierarchy"> | ||
<li> | ||
<span class="target">Symmetric</span> | ||
</li> | ||
</ul> | ||
</section> | ||
<section class="tsd-panel-group tsd-index-group"> | ||
<h2>Index</h2> | ||
<section class="tsd-panel tsd-index-panel"> | ||
<div class="tsd-index-content"> | ||
<section class="tsd-index-section tsd-is-not-exported"> | ||
<h3>Methods</h3> | ||
<ul class="tsd-index-list"> | ||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"><a href="_bcl_.symmetric.html#decrypt" class="tsd-kind-icon">decrypt</a></li> | ||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"><a href="_bcl_.symmetric.html#encrypt" class="tsd-kind-icon">encrypt</a></li> | ||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"><a href="_bcl_.symmetric.html#secret" class="tsd-kind-icon">secret</a></li> | ||
</ul> | ||
</section> | ||
</div> | ||
</section> | ||
</section> | ||
<section class="tsd-panel-group tsd-member-group tsd-is-not-exported"> | ||
<h2>Methods</h2> | ||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"> | ||
<a name="decrypt" class="tsd-anchor"></a> | ||
<h3><span class="tsd-flag ts-flagStatic">Static</span> decrypt</h3> | ||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"> | ||
<li class="tsd-signature tsd-kind-icon">decrypt<span class="tsd-signature-symbol">(</span>secretKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><a href="_bcl_.secret.html" class="tsd-signature-type">Secret</a>, ciphertext<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><a href="_bcl_.cipher.html" class="tsd-signature-type">Cipher</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><a href="_bcl_.plain.html" class="tsd-signature-type">Plain</a></li> | ||
</ul> | ||
<ul class="tsd-descriptions"> | ||
<li class="tsd-description"> | ||
<aside class="tsd-sources"> | ||
<ul> | ||
<li>Defined in <a href="https://github.com/nthparty/bcl-js/blob/fa39548/src/bcl.ts#L238">src/bcl.ts:238</a></li> | ||
</ul> | ||
</aside> | ||
<div class="tsd-comment tsd-typography"> | ||
<div class="lead"> | ||
<p>Decrypt a ciphertext (a bytes-like object) using the supplied secret key.</p> | ||
</div> | ||
</div> | ||
<h4 class="tsd-parameters-title">Parameters</h4> | ||
<ul class="tsd-parameters"> | ||
<li> | ||
<h5>secretKey: <span class="tsd-signature-symbol">typeof </span><a href="_bcl_.secret.html" class="tsd-signature-type">Secret</a></h5> | ||
<div class="tsd-comment tsd-typography"> | ||
<p>Secret key.</p> | ||
</div> | ||
</li> | ||
<li> | ||
<h5>ciphertext: <span class="tsd-signature-symbol">typeof </span><a href="_bcl_.cipher.html" class="tsd-signature-type">Cipher</a></h5> | ||
<div class="tsd-comment tsd-typography"> | ||
<p>Ciphertext to decrypt.</p> | ||
</div> | ||
</li> | ||
</ul> | ||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">typeof </span><a href="_bcl_.plain.html" class="tsd-signature-type">Plain</a></h4> | ||
<p>Decrypted plaintext.</p> | ||
</li> | ||
</ul> | ||
</section> | ||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"> | ||
<a name="encrypt" class="tsd-anchor"></a> | ||
<h3><span class="tsd-flag ts-flagStatic">Static</span> encrypt</h3> | ||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"> | ||
<li class="tsd-signature tsd-kind-icon">encrypt<span class="tsd-signature-symbol">(</span>secretKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><a href="_bcl_.secret.html" class="tsd-signature-type">Secret</a>, plaintext<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><a href="_bcl_.plain.html" class="tsd-signature-type">Plain</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><a href="_bcl_.cipher.html" class="tsd-signature-type">Cipher</a></li> | ||
</ul> | ||
<ul class="tsd-descriptions"> | ||
<li class="tsd-description"> | ||
<aside class="tsd-sources"> | ||
<ul> | ||
<li>Defined in <a href="https://github.com/nthparty/bcl-js/blob/fa39548/src/bcl.ts#L225">src/bcl.ts:225</a></li> | ||
</ul> | ||
</aside> | ||
<div class="tsd-comment tsd-typography"> | ||
<div class="lead"> | ||
<p>Encrypt a plaintext (a bytes-like object) using the supplied secret key.</p> | ||
</div> | ||
</div> | ||
<h4 class="tsd-parameters-title">Parameters</h4> | ||
<ul class="tsd-parameters"> | ||
<li> | ||
<h5>secretKey: <span class="tsd-signature-symbol">typeof </span><a href="_bcl_.secret.html" class="tsd-signature-type">Secret</a></h5> | ||
<div class="tsd-comment tsd-typography"> | ||
<p>Secret key.</p> | ||
</div> | ||
</li> | ||
<li> | ||
<h5>plaintext: <span class="tsd-signature-symbol">typeof </span><a href="_bcl_.plain.html" class="tsd-signature-type">Plain</a></h5> | ||
<div class="tsd-comment tsd-typography"> | ||
<p>Message to encrypt.</p> | ||
</div> | ||
</li> | ||
</ul> | ||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">typeof </span><a href="_bcl_.cipher.html" class="tsd-signature-type">Cipher</a></h4> | ||
<p>Encrypted ciphertext.</p> | ||
</li> | ||
</ul> | ||
</section> | ||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"> | ||
<a name="secret" class="tsd-anchor"></a> | ||
<h3><span class="tsd-flag ts-flagStatic">Static</span> secret</h3> | ||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"> | ||
<li class="tsd-signature tsd-kind-icon">secret<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">typeof </span><a href="_bcl_.secret.html" class="tsd-signature-type">Secret</a></li> | ||
</ul> | ||
<ul class="tsd-descriptions"> | ||
<li class="tsd-description"> | ||
<aside class="tsd-sources"> | ||
<ul> | ||
<li>Defined in <a href="https://github.com/nthparty/bcl-js/blob/fa39548/src/bcl.ts#L214">src/bcl.ts:214</a></li> | ||
</ul> | ||
</aside> | ||
<div class="tsd-comment tsd-typography"> | ||
<div class="lead"> | ||
<p>Create a secret key.</p> | ||
</div> | ||
</div> | ||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">typeof </span><a href="_bcl_.secret.html" class="tsd-signature-type">Secret</a></h4> | ||
<p>Secret key.</p> | ||
</li> | ||
</ul> | ||
</section> | ||
</section> | ||
</div> | ||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight"> | ||
<nav class="tsd-navigation primary"> | ||
<ul> | ||
<li class="globals "> | ||
<a href="../globals.html"><em>Globals</em></a> | ||
</li> | ||
<li class="current tsd-kind-module"> | ||
<a href="../modules/_bcl_.html">"bcl"</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
<nav class="tsd-navigation secondary menu-sticky"> | ||
<ul class="before-current"> | ||
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="_bcl_.asymmetric.html" class="tsd-kind-icon">Asymmetric</a> | ||
</li> | ||
<li class=" tsd-kind-class tsd-parent-kind-module"> | ||
<a href="_bcl_.bcl.html" class="tsd-kind-icon">BCl</a> | ||
</li> | ||
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="_bcl_.cipher.html" class="tsd-kind-icon">Cipher</a> | ||
</li> | ||
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="_bcl_.key.html" class="tsd-kind-icon">Key</a> | ||
</li> | ||
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="_bcl_.plain.html" class="tsd-kind-icon">Plain</a> | ||
</li> | ||
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="_bcl_.public.html" class="tsd-kind-icon">Public</a> | ||
</li> | ||
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="_bcl_.raw.html" class="tsd-kind-icon">Raw</a> | ||
</li> | ||
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="_bcl_.secret.html" class="tsd-kind-icon">Secret</a> | ||
</li> | ||
<li class=" tsd-kind-class tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="_bcl_.sodium.html" class="tsd-kind-icon">Sodium</a> | ||
</li> | ||
</ul> | ||
<ul class="current"> | ||
<li class="current tsd-kind-class tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="_bcl_.symmetric.html" class="tsd-kind-icon">Symmetric</a> | ||
<ul> | ||
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"> | ||
<a href="_bcl_.symmetric.html#decrypt" class="tsd-kind-icon">decrypt</a> | ||
</li> | ||
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"> | ||
<a href="_bcl_.symmetric.html#encrypt" class="tsd-kind-icon">encrypt</a> | ||
</li> | ||
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static tsd-is-not-exported"> | ||
<a href="_bcl_.symmetric.html#secret" class="tsd-kind-icon">secret</a> | ||
</li> | ||
</ul> | ||
</li> | ||
</ul> | ||
<ul class="after-current"> | ||
<li class=" tsd-kind-variable tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="../modules/_bcl_.html#sodium-1" class="tsd-kind-icon">sodium</a> | ||
</li> | ||
<li class=" tsd-kind-object-literal tsd-parent-kind-module tsd-is-not-exported"> | ||
<a href="../modules/_bcl_.html#utility" class="tsd-kind-icon">Utility</a> | ||
</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
</div> | ||
</div> | ||
<footer class="with-border-bottom"> | ||
<div class="container"> | ||
<h2>Legend</h2> | ||
<div class="tsd-legend-group"> | ||
<ul class="tsd-legend"> | ||
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li> | ||
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li> | ||
</ul> | ||
<ul class="tsd-legend"> | ||
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li> | ||
</ul> | ||
<ul class="tsd-legend"> | ||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li> | ||
</ul> | ||
</div> | ||
</div> | ||
</footer> | ||
<div class="container tsd-generator"> | ||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p> | ||
</div> | ||
<div class="overlay"></div> | ||
<script src="../assets/js/main.js"></script> | ||
</body> | ||
</html> |