@sudoplatform/sudo-common 6.3.0 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/classes/DefaultSudoKeyManager.html +11 -11
- package/github/docs/classes/DefaultSudoKeyManager.html +11 -11
- package/github/src/sudoKeyManager/sudoKeyManager.ts +12 -20
- package/github/test/unit/sudoKeyManager.spec.ts +18 -18
- package/lib/sudoKeyManager/sudoKeyManager.js +12 -4
- package/package.json +1 -1
- package/src/sudoKeyManager/sudoKeyManager.ts +12 -20
- package/test/unit/sudoKeyManager.spec.ts +18 -18
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
</div><div><p>The format of the public key should be SubjectPublicKeyInfo (spki)</p>
|
|
9
9
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="addSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">add<wbr/>Symmetric<wbr/>Key<a href="#addSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">add<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#addSymmetricKey">addSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:388</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
10
10
|
<p>Adds a symmetric key to the secure store.</p>
|
|
11
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithPrivateKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Private<wbr/>Key<a href="#decryptWithPrivateKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Private<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithPrivateKey">decryptWithPrivateKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
11
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithPrivateKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Private<wbr/>Key<a href="#decryptWithPrivateKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Private<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithPrivateKey">decryptWithPrivateKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:512</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
12
12
|
<p>Decrypts the given data with the specified private key.</p>
|
|
13
13
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Decrypted data or undefined if the private key is not found.</p>
|
|
14
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<a href="#decryptWithSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithSymmetricKey">decryptWithSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
15
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithSymmetricKeyName" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<a href="#decryptWithSymmetricKeyName" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithSymmetricKeyName">decryptWithSymmetricKeyName</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
14
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<a href="#decryptWithSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithSymmetricKey">decryptWithSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:450</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ivOrOptions: <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Decrypted data</p>
|
|
15
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithSymmetricKeyName" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<a href="#decryptWithSymmetricKeyName" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithSymmetricKeyName">decryptWithSymmetricKeyName</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:486</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ivOrOptions: <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Decrypted data</p>
|
|
16
16
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="deleteKeyPair" class="tsd-anchor"></a><h3 class="tsd-anchor-link">delete<wbr/>Key<wbr/>Pair<a href="#deleteKeyPair" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">delete<wbr/>Key<wbr/>Pair<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#deleteKeyPair">deleteKeyPair</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:428</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
17
17
|
<p>Deletes a key pair from the secure store.</p>
|
|
18
18
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="deletePassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">delete<wbr/>Password<a href="#deletePassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">delete<wbr/>Password<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#deletePassword">deletePassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:380</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
<p>Checks to see if the specified private key exists.</p>
|
|
24
24
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="doesSymmetricKeyExists" class="tsd-anchor"></a><h3 class="tsd-anchor-link">does<wbr/>Symmetric<wbr/>Key<wbr/>Exists<a href="#doesSymmetricKeyExists" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">does<wbr/>Symmetric<wbr/>Key<wbr/>Exists<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#doesSymmetricKeyExists">doesSymmetricKeyExists</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:396</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
25
25
|
<p>Checks to see if the specified symmetric key exists.</p>
|
|
26
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithPublicKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Public<wbr/>Key<a href="#encryptWithPublicKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Public<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithPublicKey">encryptWithPublicKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
26
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithPublicKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Public<wbr/>Key<a href="#encryptWithPublicKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Public<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithPublicKey">encryptWithPublicKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:504</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
27
27
|
<p>Encrypts the given data with the specified public key.</p>
|
|
28
28
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Encrypted data</p>
|
|
29
29
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<a href="#encryptWithSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithSymmetricKey">encryptWithSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:432</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ivOrOptions: <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Encrypted data and IV</p>
|
|
30
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithSymmetricKeyName" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<a href="#encryptWithSymmetricKeyName" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithSymmetricKeyName">encryptWithSymmetricKeyName</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
31
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="exportKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">export<wbr/>Keys<a href="#exportKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">export<wbr/>Keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/KeyData.html" class="tsd-signature-type" data-tsd-kind="Interface">KeyData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#exportKeys">exportKeys</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
30
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithSymmetricKeyName" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<a href="#encryptWithSymmetricKeyName" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithSymmetricKeyName">encryptWithSymmetricKeyName</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:468</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ivOrOptions: <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Decrypted data</p>
|
|
31
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="exportKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">export<wbr/>Keys<a href="#exportKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">export<wbr/>Keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/KeyData.html" class="tsd-signature-type" data-tsd-kind="Interface">KeyData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#exportKeys">exportKeys</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:548</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
32
32
|
<p>Export all contents of the key manager as an array of KeyArchiveKeyInfo
|
|
33
33
|
ready for archive.</p>
|
|
34
|
-
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/KeyData.html" class="tsd-signature-type" data-tsd-kind="Interface">KeyData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateHash" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Hash<a href="#generateHash" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Hash<span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateHash">generateHash</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
34
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/KeyData.html" class="tsd-signature-type" data-tsd-kind="Interface">KeyData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateHash" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Hash<a href="#generateHash" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Hash<span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateHash">generateHash</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:544</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
35
35
|
<p>Creates a SHA256 hash of the specified data.</p>
|
|
36
36
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateKeyPair" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Key<wbr/>Pair<a href="#generateKeyPair" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Key<wbr/>Pair<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateKeyPair">generateKeyPair</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:404</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
37
37
|
<p>Generates and securely stores a key pair for public key cryptography.</p>
|
|
38
38
|
</div><div><p>The public key is exported as <code>SubjectPublicKeyInfo (spki) The private key is exported as </code>pkcs8`</p>
|
|
39
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateRandomData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Random<wbr/>Data<a href="#generateRandomData" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Random<wbr/>Data<span class="tsd-signature-symbol">(</span>size<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateRandomData">generateRandomData</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
39
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateRandomData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Random<wbr/>Data<a href="#generateRandomData" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Random<wbr/>Data<span class="tsd-signature-symbol">(</span>size<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateRandomData">generateRandomData</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:540</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
40
40
|
<p>Generate random bytes using a secure random number generator.</p>
|
|
41
41
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>size: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>ArrayBuffer containing the random bytes.</p>
|
|
42
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Symmetric<wbr/>Key<a href="#generateSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateSymmetricKey">generateSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
42
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Symmetric<wbr/>Key<a href="#generateSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateSymmetricKey">generateSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:524</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
43
43
|
<p>Generates and securely stores a symmetric key.</p>
|
|
44
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateSymmetricKeyFromPassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Symmetric<wbr/>Key<wbr/>From<wbr/>Password<a href="#generateSymmetricKeyFromPassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Symmetric<wbr/>Key<wbr/>From<wbr/>Password<span class="tsd-signature-symbol">(</span>password<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, salt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>rounds<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateSymmetricKeyFromPassword">generateSymmetricKeyFromPassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
44
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateSymmetricKeyFromPassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Symmetric<wbr/>Key<wbr/>From<wbr/>Password<a href="#generateSymmetricKeyFromPassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Symmetric<wbr/>Key<wbr/>From<wbr/>Password<span class="tsd-signature-symbol">(</span>password<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, salt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>rounds<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateSymmetricKeyFromPassword">generateSymmetricKeyFromPassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:528</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
45
45
|
<p>Generates a symmetric key, derived from a password using PBKDF2.</p>
|
|
46
46
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>password: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>salt: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-symbol">{ </span>rounds<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span></h5><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> rounds<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>The generated symmetric key.</p>
|
|
47
47
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getPassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Password<a href="#getPassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Password<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#getPassword">getPassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:376</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
@@ -57,7 +57,7 @@ ready for archive.</p>
|
|
|
57
57
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Symmetric<wbr/>Key<a href="#getSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#getSymmetricKey">getSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:392</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
58
58
|
<p>Retrieves a symmetric key from the secure store.</p>
|
|
59
59
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>The symmetric key or undefined if not found.</p>
|
|
60
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="removeAllKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">remove<wbr/>All<wbr/>Keys<a href="#removeAllKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">remove<wbr/>All<wbr/>Keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#removeAllKeys">removeAllKeys</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
60
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="removeAllKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">remove<wbr/>All<wbr/>Keys<a href="#removeAllKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">remove<wbr/>All<wbr/>Keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#removeAllKeys">removeAllKeys</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:520</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
61
61
|
<p>Remove all keys associated with this <code>SudoKeyManager</code></p>
|
|
62
62
|
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="updatePassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">update<wbr/>Password<a href="#updatePassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">update<wbr/>Password<span class="tsd-signature-symbol">(</span>password<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#updatePassword">updatePassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:384</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
63
63
|
<p>Updates a password stored in the secure store.</p>
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
</div><div><p>The format of the public key should be SubjectPublicKeyInfo (spki)</p>
|
|
9
9
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="addSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">add<wbr/>Symmetric<wbr/>Key<a href="#addSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">add<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#addSymmetricKey">addSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:388</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
10
10
|
<p>Adds a symmetric key to the secure store.</p>
|
|
11
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithPrivateKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Private<wbr/>Key<a href="#decryptWithPrivateKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Private<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithPrivateKey">decryptWithPrivateKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
11
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithPrivateKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Private<wbr/>Key<a href="#decryptWithPrivateKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Private<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithPrivateKey">decryptWithPrivateKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:512</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
12
12
|
<p>Decrypts the given data with the specified private key.</p>
|
|
13
13
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Decrypted data or undefined if the private key is not found.</p>
|
|
14
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<a href="#decryptWithSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithSymmetricKey">decryptWithSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
15
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithSymmetricKeyName" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<a href="#decryptWithSymmetricKeyName" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithSymmetricKeyName">decryptWithSymmetricKeyName</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
14
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<a href="#decryptWithSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithSymmetricKey">decryptWithSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:450</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ivOrOptions: <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Decrypted data</p>
|
|
15
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="decryptWithSymmetricKeyName" class="tsd-anchor"></a><h3 class="tsd-anchor-link">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<a href="#decryptWithSymmetricKeyName" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">decrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#decryptWithSymmetricKeyName">decryptWithSymmetricKeyName</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:486</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ivOrOptions: <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Decrypted data</p>
|
|
16
16
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="deleteKeyPair" class="tsd-anchor"></a><h3 class="tsd-anchor-link">delete<wbr/>Key<wbr/>Pair<a href="#deleteKeyPair" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">delete<wbr/>Key<wbr/>Pair<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#deleteKeyPair">deleteKeyPair</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:428</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
17
17
|
<p>Deletes a key pair from the secure store.</p>
|
|
18
18
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="deletePassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">delete<wbr/>Password<a href="#deletePassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">delete<wbr/>Password<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#deletePassword">deletePassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:380</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
@@ -23,25 +23,25 @@
|
|
|
23
23
|
<p>Checks to see if the specified private key exists.</p>
|
|
24
24
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="doesSymmetricKeyExists" class="tsd-anchor"></a><h3 class="tsd-anchor-link">does<wbr/>Symmetric<wbr/>Key<wbr/>Exists<a href="#doesSymmetricKeyExists" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">does<wbr/>Symmetric<wbr/>Key<wbr/>Exists<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#doesSymmetricKeyExists">doesSymmetricKeyExists</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:396</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
25
25
|
<p>Checks to see if the specified symmetric key exists.</p>
|
|
26
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithPublicKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Public<wbr/>Key<a href="#encryptWithPublicKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Public<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithPublicKey">encryptWithPublicKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
26
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithPublicKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Public<wbr/>Key<a href="#encryptWithPublicKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Public<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithPublicKey">encryptWithPublicKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:504</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
27
27
|
<p>Encrypts the given data with the specified public key.</p>
|
|
28
28
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <a href="../interfaces/AsymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">AsymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Encrypted data</p>
|
|
29
29
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<a href="#encryptWithSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>key<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithSymmetricKey">encryptWithSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:432</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>key: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ivOrOptions: <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Encrypted data and IV</p>
|
|
30
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithSymmetricKeyName" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<a href="#encryptWithSymmetricKeyName" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithSymmetricKeyName">encryptWithSymmetricKeyName</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
31
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="exportKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">export<wbr/>Keys<a href="#exportKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">export<wbr/>Keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/KeyData.html" class="tsd-signature-type" data-tsd-kind="Interface">KeyData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#exportKeys">exportKeys</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
30
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encryptWithSymmetricKeyName" class="tsd-anchor"></a><h3 class="tsd-anchor-link">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<a href="#encryptWithSymmetricKeyName" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">encrypt<wbr/>With<wbr/>Symmetric<wbr/>Key<wbr/>Name<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, ivOrOptions<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#encryptWithSymmetricKeyName">encryptWithSymmetricKeyName</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:468</li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> ivOrOptions: <span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol"> | </span><a href="../interfaces/SymmetricEncryptionOptions.html" class="tsd-signature-type" data-tsd-kind="Interface">SymmetricEncryptionOptions</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>Decrypted data</p>
|
|
31
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="exportKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">export<wbr/>Keys<a href="#exportKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">export<wbr/>Keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/KeyData.html" class="tsd-signature-type" data-tsd-kind="Interface">KeyData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#exportKeys">exportKeys</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:548</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
32
32
|
<p>Export all contents of the key manager as an array of KeyArchiveKeyInfo
|
|
33
33
|
ready for archive.</p>
|
|
34
|
-
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/KeyData.html" class="tsd-signature-type" data-tsd-kind="Interface">KeyData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateHash" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Hash<a href="#generateHash" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Hash<span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateHash">generateHash</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
34
|
+
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/KeyData.html" class="tsd-signature-type" data-tsd-kind="Interface">KeyData</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateHash" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Hash<a href="#generateHash" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Hash<span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateHash">generateHash</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:544</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
35
35
|
<p>Creates a SHA256 hash of the specified data.</p>
|
|
36
36
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>data: <span class="tsd-signature-type">ArrayBuffer</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateKeyPair" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Key<wbr/>Pair<a href="#generateKeyPair" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Key<wbr/>Pair<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateKeyPair">generateKeyPair</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:404</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
37
37
|
<p>Generates and securely stores a key pair for public key cryptography.</p>
|
|
38
38
|
</div><div><p>The public key is exported as <code>SubjectPublicKeyInfo (spki) The private key is exported as </code>pkcs8`</p>
|
|
39
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateRandomData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Random<wbr/>Data<a href="#generateRandomData" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Random<wbr/>Data<span class="tsd-signature-symbol">(</span>size<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateRandomData">generateRandomData</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
39
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateRandomData" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Random<wbr/>Data<a href="#generateRandomData" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Random<wbr/>Data<span class="tsd-signature-symbol">(</span>size<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateRandomData">generateRandomData</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:540</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
40
40
|
<p>Generate random bytes using a secure random number generator.</p>
|
|
41
41
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>size: <span class="tsd-signature-type">number</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>ArrayBuffer containing the random bytes.</p>
|
|
42
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Symmetric<wbr/>Key<a href="#generateSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateSymmetricKey">generateSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
42
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Symmetric<wbr/>Key<a href="#generateSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateSymmetricKey">generateSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:524</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
43
43
|
<p>Generates and securely stores a symmetric key.</p>
|
|
44
|
-
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateSymmetricKeyFromPassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Symmetric<wbr/>Key<wbr/>From<wbr/>Password<a href="#generateSymmetricKeyFromPassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Symmetric<wbr/>Key<wbr/>From<wbr/>Password<span class="tsd-signature-symbol">(</span>password<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, salt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>rounds<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateSymmetricKeyFromPassword">generateSymmetricKeyFromPassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
44
|
+
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="generateSymmetricKeyFromPassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">generate<wbr/>Symmetric<wbr/>Key<wbr/>From<wbr/>Password<a href="#generateSymmetricKeyFromPassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">generate<wbr/>Symmetric<wbr/>Key<wbr/>From<wbr/>Password<span class="tsd-signature-symbol">(</span>password<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, salt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{ </span>rounds<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#generateSymmetricKeyFromPassword">generateSymmetricKeyFromPassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:528</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
45
45
|
<p>Generates a symmetric key, derived from a password using PBKDF2.</p>
|
|
46
46
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>password: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5>salt: <span class="tsd-signature-type">ArrayBuffer</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-symbol">{ </span>rounds<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> }</span></h5><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> rounds<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">number</span></h5></li></ul></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>The generated symmetric key.</p>
|
|
47
47
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getPassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Password<a href="#getPassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Password<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#getPassword">getPassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:376</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
@@ -57,7 +57,7 @@ ready for archive.</p>
|
|
|
57
57
|
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="getSymmetricKey" class="tsd-anchor"></a><h3 class="tsd-anchor-link">get<wbr/>Symmetric<wbr/>Key<a href="#getSymmetricKey" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">get<wbr/>Symmetric<wbr/>Key<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#getSymmetricKey">getSymmetricKey</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:392</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
58
58
|
<p>Retrieves a symmetric key from the secure store.</p>
|
|
59
59
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>name: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">ArrayBuffer</span><span class="tsd-signature-symbol">></span></h4><div><p>The symmetric key or undefined if not found.</p>
|
|
60
|
-
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="removeAllKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">remove<wbr/>All<wbr/>Keys<a href="#removeAllKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">remove<wbr/>All<wbr/>Keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#removeAllKeys">removeAllKeys</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:
|
|
60
|
+
</div></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="removeAllKeys" class="tsd-anchor"></a><h3 class="tsd-anchor-link">remove<wbr/>All<wbr/>Keys<a href="#removeAllKeys" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">remove<wbr/>All<wbr/>Keys<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#removeAllKeys">removeAllKeys</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:520</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
61
61
|
<p>Remove all keys associated with this <code>SudoKeyManager</code></p>
|
|
62
62
|
</div></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4></li></ul></section><section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="updatePassword" class="tsd-anchor"></a><h3 class="tsd-anchor-link">update<wbr/>Password<a href="#updatePassword" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class"><li class="tsd-signature tsd-kind-icon">update<wbr/>Password<span class="tsd-signature-symbol">(</span>password<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">ArrayBuffer</span>, name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><p>Implementation of <a href="../interfaces/SudoKeyManager.html">SudoKeyManager</a>.<a href="../interfaces/SudoKeyManager.html#updatePassword">updatePassword</a></p><ul><li>Defined in src/sudoKeyManager/sudoKeyManager.ts:384</li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
|
63
63
|
<p>Updates a password stored in the secure store.</p>
|
|
@@ -435,11 +435,9 @@ export class DefaultSudoKeyManager implements SudoKeyManager {
|
|
|
435
435
|
ivOrOptions?: ArrayBuffer | SymmetricEncryptionOptions,
|
|
436
436
|
): Promise<ArrayBuffer> {
|
|
437
437
|
if (BufferUtil.isArrayBuffer(ivOrOptions)) {
|
|
438
|
-
return this.sudoCryptoProvider.encryptWithSymmetricKey(
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
ivOrOptions,
|
|
442
|
-
)
|
|
438
|
+
return this.sudoCryptoProvider.encryptWithSymmetricKey(key, data, {
|
|
439
|
+
iv: ivOrOptions,
|
|
440
|
+
})
|
|
443
441
|
} else {
|
|
444
442
|
return this.sudoCryptoProvider.encryptWithSymmetricKey(
|
|
445
443
|
key,
|
|
@@ -455,11 +453,9 @@ export class DefaultSudoKeyManager implements SudoKeyManager {
|
|
|
455
453
|
ivOrOptions?: ArrayBuffer | SymmetricEncryptionOptions,
|
|
456
454
|
): Promise<ArrayBuffer> {
|
|
457
455
|
if (BufferUtil.isArrayBuffer(ivOrOptions)) {
|
|
458
|
-
return this.sudoCryptoProvider.decryptWithSymmetricKey(
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
ivOrOptions,
|
|
462
|
-
)
|
|
456
|
+
return this.sudoCryptoProvider.decryptWithSymmetricKey(key, data, {
|
|
457
|
+
iv: ivOrOptions,
|
|
458
|
+
})
|
|
463
459
|
} else {
|
|
464
460
|
return this.sudoCryptoProvider.decryptWithSymmetricKey(
|
|
465
461
|
key,
|
|
@@ -475,11 +471,9 @@ export class DefaultSudoKeyManager implements SudoKeyManager {
|
|
|
475
471
|
ivOrOptions?: ArrayBuffer | SymmetricEncryptionOptions,
|
|
476
472
|
): Promise<ArrayBuffer> {
|
|
477
473
|
if (BufferUtil.isArrayBuffer(ivOrOptions)) {
|
|
478
|
-
return this.sudoCryptoProvider.encryptWithSymmetricKeyName(
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
ivOrOptions,
|
|
482
|
-
)
|
|
474
|
+
return this.sudoCryptoProvider.encryptWithSymmetricKeyName(name, data, {
|
|
475
|
+
iv: ivOrOptions,
|
|
476
|
+
})
|
|
483
477
|
} else {
|
|
484
478
|
return this.sudoCryptoProvider.encryptWithSymmetricKeyName(
|
|
485
479
|
name,
|
|
@@ -495,11 +489,9 @@ export class DefaultSudoKeyManager implements SudoKeyManager {
|
|
|
495
489
|
ivOrOptions?: ArrayBuffer | SymmetricEncryptionOptions,
|
|
496
490
|
): Promise<ArrayBuffer> {
|
|
497
491
|
if (BufferUtil.isArrayBuffer(ivOrOptions)) {
|
|
498
|
-
return this.sudoCryptoProvider.decryptWithSymmetricKeyName(
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
ivOrOptions,
|
|
502
|
-
)
|
|
492
|
+
return this.sudoCryptoProvider.decryptWithSymmetricKeyName(name, data, {
|
|
493
|
+
iv: ivOrOptions,
|
|
494
|
+
})
|
|
503
495
|
} else {
|
|
504
496
|
return this.sudoCryptoProvider.decryptWithSymmetricKeyName(
|
|
505
497
|
name,
|
|
@@ -393,8 +393,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
393
393
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
394
394
|
expect(actualData).toStrictEqual(decrypted)
|
|
395
395
|
expect(actualOptions).toBeDefined()
|
|
396
|
-
expect(actualOptions
|
|
397
|
-
expect(actualOptions
|
|
396
|
+
expect(actualOptions!.iv).toStrictEqual(iv)
|
|
397
|
+
expect(actualOptions!.algorithm).toBeUndefined()
|
|
398
398
|
|
|
399
399
|
verify(
|
|
400
400
|
sudoCryptoProviderMock.encryptWithSymmetricKeyName(
|
|
@@ -430,8 +430,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
430
430
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
431
431
|
expect(actualData).toStrictEqual(decrypted)
|
|
432
432
|
expect(actualOptions).toBeDefined()
|
|
433
|
-
expect(actualOptions
|
|
434
|
-
expect(actualOptions
|
|
433
|
+
expect(actualOptions!.iv).toStrictEqual(options.iv)
|
|
434
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
435
435
|
|
|
436
436
|
verify(
|
|
437
437
|
sudoCryptoProviderMock.encryptWithSymmetricKeyName(
|
|
@@ -492,8 +492,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
492
492
|
expect(actualKey).toStrictEqual(symmetricKey)
|
|
493
493
|
expect(actualData).toStrictEqual(encrypted)
|
|
494
494
|
expect(actualOptions).toBeDefined()
|
|
495
|
-
expect(actualOptions
|
|
496
|
-
expect(actualOptions
|
|
495
|
+
expect(actualOptions!.iv).toStrictEqual(iv)
|
|
496
|
+
expect(actualOptions!.algorithm).toBeUndefined()
|
|
497
497
|
|
|
498
498
|
verify(
|
|
499
499
|
sudoCryptoProviderMock.encryptWithSymmetricKey(
|
|
@@ -530,8 +530,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
530
530
|
expect(actualKey).toStrictEqual(symmetricKey)
|
|
531
531
|
expect(actualData).toStrictEqual(encrypted)
|
|
532
532
|
expect(actualOptions).toBeDefined()
|
|
533
|
-
expect(actualOptions
|
|
534
|
-
expect(actualOptions
|
|
533
|
+
expect(actualOptions!.iv).toBeUndefined()
|
|
534
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
535
535
|
|
|
536
536
|
verify(
|
|
537
537
|
sudoCryptoProviderMock.encryptWithSymmetricKey(
|
|
@@ -599,8 +599,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
599
599
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
600
600
|
expect(actualData).toStrictEqual(encrypted)
|
|
601
601
|
expect(actualOptions).toBeDefined()
|
|
602
|
-
expect(actualOptions
|
|
603
|
-
expect(actualOptions
|
|
602
|
+
expect(actualOptions!.iv).toStrictEqual(options.iv)
|
|
603
|
+
expect(actualOptions!.algorithm).toBeUndefined()
|
|
604
604
|
|
|
605
605
|
verify(
|
|
606
606
|
sudoCryptoProviderMock.decryptWithSymmetricKeyName(
|
|
@@ -638,8 +638,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
638
638
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
639
639
|
expect(actualData).toStrictEqual(encrypted)
|
|
640
640
|
expect(actualOptions).toBeDefined()
|
|
641
|
-
expect(actualOptions
|
|
642
|
-
expect(actualOptions
|
|
641
|
+
expect(actualOptions!.iv).toStrictEqual(options.iv)
|
|
642
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
643
643
|
|
|
644
644
|
verify(
|
|
645
645
|
sudoCryptoProviderMock.decryptWithSymmetricKeyName(
|
|
@@ -707,8 +707,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
707
707
|
expect(actualKey).toStrictEqual(symmetricKey)
|
|
708
708
|
expect(actualData).toStrictEqual(encrypted)
|
|
709
709
|
expect(actualOptions).toBeDefined()
|
|
710
|
-
expect(actualOptions
|
|
711
|
-
expect(actualOptions
|
|
710
|
+
expect(actualOptions!.iv).toStrictEqual(iv)
|
|
711
|
+
expect(actualOptions!.algorithm).toBeUndefined()
|
|
712
712
|
|
|
713
713
|
verify(
|
|
714
714
|
sudoCryptoProviderMock.decryptWithSymmetricKey(
|
|
@@ -746,8 +746,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
746
746
|
expect(actualKey).toStrictEqual(symmetricKey)
|
|
747
747
|
expect(actualData).toStrictEqual(encrypted)
|
|
748
748
|
expect(actualOptions).toBeDefined()
|
|
749
|
-
expect(actualOptions
|
|
750
|
-
expect(actualOptions
|
|
749
|
+
expect(actualOptions!.iv).toStrictEqual(iv)
|
|
750
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
751
751
|
|
|
752
752
|
verify(
|
|
753
753
|
sudoCryptoProviderMock.decryptWithSymmetricKey(
|
|
@@ -811,7 +811,7 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
811
811
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
812
812
|
expect(actualData).toStrictEqual(decrypted)
|
|
813
813
|
expect(actualOptions).toBeDefined()
|
|
814
|
-
expect(actualOptions
|
|
814
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
815
815
|
|
|
816
816
|
verify(
|
|
817
817
|
sudoCryptoProviderMock.encryptWithPublicKey(
|
|
@@ -875,7 +875,7 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
875
875
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
876
876
|
expect(actualData).toStrictEqual(encrypted)
|
|
877
877
|
expect(actualOptions).toBeDefined()
|
|
878
|
-
expect(actualOptions
|
|
878
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
879
879
|
|
|
880
880
|
verify(
|
|
881
881
|
sudoCryptoProviderMock.decryptWithPrivateKey(
|
|
@@ -87,7 +87,9 @@ class DefaultSudoKeyManager {
|
|
|
87
87
|
|
|
88
88
|
encryptWithSymmetricKey(key, data, ivOrOptions) {
|
|
89
89
|
if (_buffer.Buffer.isArrayBuffer(ivOrOptions)) {
|
|
90
|
-
return this.sudoCryptoProvider.encryptWithSymmetricKey(key, data,
|
|
90
|
+
return this.sudoCryptoProvider.encryptWithSymmetricKey(key, data, {
|
|
91
|
+
iv: ivOrOptions
|
|
92
|
+
});
|
|
91
93
|
} else {
|
|
92
94
|
return this.sudoCryptoProvider.encryptWithSymmetricKey(key, data, ivOrOptions);
|
|
93
95
|
}
|
|
@@ -95,7 +97,9 @@ class DefaultSudoKeyManager {
|
|
|
95
97
|
|
|
96
98
|
decryptWithSymmetricKey(key, data, ivOrOptions) {
|
|
97
99
|
if (_buffer.Buffer.isArrayBuffer(ivOrOptions)) {
|
|
98
|
-
return this.sudoCryptoProvider.decryptWithSymmetricKey(key, data,
|
|
100
|
+
return this.sudoCryptoProvider.decryptWithSymmetricKey(key, data, {
|
|
101
|
+
iv: ivOrOptions
|
|
102
|
+
});
|
|
99
103
|
} else {
|
|
100
104
|
return this.sudoCryptoProvider.decryptWithSymmetricKey(key, data, ivOrOptions);
|
|
101
105
|
}
|
|
@@ -103,7 +107,9 @@ class DefaultSudoKeyManager {
|
|
|
103
107
|
|
|
104
108
|
encryptWithSymmetricKeyName(name, data, ivOrOptions) {
|
|
105
109
|
if (_buffer.Buffer.isArrayBuffer(ivOrOptions)) {
|
|
106
|
-
return this.sudoCryptoProvider.encryptWithSymmetricKeyName(name, data,
|
|
110
|
+
return this.sudoCryptoProvider.encryptWithSymmetricKeyName(name, data, {
|
|
111
|
+
iv: ivOrOptions
|
|
112
|
+
});
|
|
107
113
|
} else {
|
|
108
114
|
return this.sudoCryptoProvider.encryptWithSymmetricKeyName(name, data, ivOrOptions);
|
|
109
115
|
}
|
|
@@ -111,7 +117,9 @@ class DefaultSudoKeyManager {
|
|
|
111
117
|
|
|
112
118
|
decryptWithSymmetricKeyName(name, data, ivOrOptions) {
|
|
113
119
|
if (_buffer.Buffer.isArrayBuffer(ivOrOptions)) {
|
|
114
|
-
return this.sudoCryptoProvider.decryptWithSymmetricKeyName(name, data,
|
|
120
|
+
return this.sudoCryptoProvider.decryptWithSymmetricKeyName(name, data, {
|
|
121
|
+
iv: ivOrOptions
|
|
122
|
+
});
|
|
115
123
|
} else {
|
|
116
124
|
return this.sudoCryptoProvider.decryptWithSymmetricKeyName(name, data, ivOrOptions);
|
|
117
125
|
}
|
package/package.json
CHANGED
|
@@ -435,11 +435,9 @@ export class DefaultSudoKeyManager implements SudoKeyManager {
|
|
|
435
435
|
ivOrOptions?: ArrayBuffer | SymmetricEncryptionOptions,
|
|
436
436
|
): Promise<ArrayBuffer> {
|
|
437
437
|
if (BufferUtil.isArrayBuffer(ivOrOptions)) {
|
|
438
|
-
return this.sudoCryptoProvider.encryptWithSymmetricKey(
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
ivOrOptions,
|
|
442
|
-
)
|
|
438
|
+
return this.sudoCryptoProvider.encryptWithSymmetricKey(key, data, {
|
|
439
|
+
iv: ivOrOptions,
|
|
440
|
+
})
|
|
443
441
|
} else {
|
|
444
442
|
return this.sudoCryptoProvider.encryptWithSymmetricKey(
|
|
445
443
|
key,
|
|
@@ -455,11 +453,9 @@ export class DefaultSudoKeyManager implements SudoKeyManager {
|
|
|
455
453
|
ivOrOptions?: ArrayBuffer | SymmetricEncryptionOptions,
|
|
456
454
|
): Promise<ArrayBuffer> {
|
|
457
455
|
if (BufferUtil.isArrayBuffer(ivOrOptions)) {
|
|
458
|
-
return this.sudoCryptoProvider.decryptWithSymmetricKey(
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
ivOrOptions,
|
|
462
|
-
)
|
|
456
|
+
return this.sudoCryptoProvider.decryptWithSymmetricKey(key, data, {
|
|
457
|
+
iv: ivOrOptions,
|
|
458
|
+
})
|
|
463
459
|
} else {
|
|
464
460
|
return this.sudoCryptoProvider.decryptWithSymmetricKey(
|
|
465
461
|
key,
|
|
@@ -475,11 +471,9 @@ export class DefaultSudoKeyManager implements SudoKeyManager {
|
|
|
475
471
|
ivOrOptions?: ArrayBuffer | SymmetricEncryptionOptions,
|
|
476
472
|
): Promise<ArrayBuffer> {
|
|
477
473
|
if (BufferUtil.isArrayBuffer(ivOrOptions)) {
|
|
478
|
-
return this.sudoCryptoProvider.encryptWithSymmetricKeyName(
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
ivOrOptions,
|
|
482
|
-
)
|
|
474
|
+
return this.sudoCryptoProvider.encryptWithSymmetricKeyName(name, data, {
|
|
475
|
+
iv: ivOrOptions,
|
|
476
|
+
})
|
|
483
477
|
} else {
|
|
484
478
|
return this.sudoCryptoProvider.encryptWithSymmetricKeyName(
|
|
485
479
|
name,
|
|
@@ -495,11 +489,9 @@ export class DefaultSudoKeyManager implements SudoKeyManager {
|
|
|
495
489
|
ivOrOptions?: ArrayBuffer | SymmetricEncryptionOptions,
|
|
496
490
|
): Promise<ArrayBuffer> {
|
|
497
491
|
if (BufferUtil.isArrayBuffer(ivOrOptions)) {
|
|
498
|
-
return this.sudoCryptoProvider.decryptWithSymmetricKeyName(
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
ivOrOptions,
|
|
502
|
-
)
|
|
492
|
+
return this.sudoCryptoProvider.decryptWithSymmetricKeyName(name, data, {
|
|
493
|
+
iv: ivOrOptions,
|
|
494
|
+
})
|
|
503
495
|
} else {
|
|
504
496
|
return this.sudoCryptoProvider.decryptWithSymmetricKeyName(
|
|
505
497
|
name,
|
|
@@ -393,8 +393,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
393
393
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
394
394
|
expect(actualData).toStrictEqual(decrypted)
|
|
395
395
|
expect(actualOptions).toBeDefined()
|
|
396
|
-
expect(actualOptions
|
|
397
|
-
expect(actualOptions
|
|
396
|
+
expect(actualOptions!.iv).toStrictEqual(iv)
|
|
397
|
+
expect(actualOptions!.algorithm).toBeUndefined()
|
|
398
398
|
|
|
399
399
|
verify(
|
|
400
400
|
sudoCryptoProviderMock.encryptWithSymmetricKeyName(
|
|
@@ -430,8 +430,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
430
430
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
431
431
|
expect(actualData).toStrictEqual(decrypted)
|
|
432
432
|
expect(actualOptions).toBeDefined()
|
|
433
|
-
expect(actualOptions
|
|
434
|
-
expect(actualOptions
|
|
433
|
+
expect(actualOptions!.iv).toStrictEqual(options.iv)
|
|
434
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
435
435
|
|
|
436
436
|
verify(
|
|
437
437
|
sudoCryptoProviderMock.encryptWithSymmetricKeyName(
|
|
@@ -492,8 +492,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
492
492
|
expect(actualKey).toStrictEqual(symmetricKey)
|
|
493
493
|
expect(actualData).toStrictEqual(encrypted)
|
|
494
494
|
expect(actualOptions).toBeDefined()
|
|
495
|
-
expect(actualOptions
|
|
496
|
-
expect(actualOptions
|
|
495
|
+
expect(actualOptions!.iv).toStrictEqual(iv)
|
|
496
|
+
expect(actualOptions!.algorithm).toBeUndefined()
|
|
497
497
|
|
|
498
498
|
verify(
|
|
499
499
|
sudoCryptoProviderMock.encryptWithSymmetricKey(
|
|
@@ -530,8 +530,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
530
530
|
expect(actualKey).toStrictEqual(symmetricKey)
|
|
531
531
|
expect(actualData).toStrictEqual(encrypted)
|
|
532
532
|
expect(actualOptions).toBeDefined()
|
|
533
|
-
expect(actualOptions
|
|
534
|
-
expect(actualOptions
|
|
533
|
+
expect(actualOptions!.iv).toBeUndefined()
|
|
534
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
535
535
|
|
|
536
536
|
verify(
|
|
537
537
|
sudoCryptoProviderMock.encryptWithSymmetricKey(
|
|
@@ -599,8 +599,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
599
599
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
600
600
|
expect(actualData).toStrictEqual(encrypted)
|
|
601
601
|
expect(actualOptions).toBeDefined()
|
|
602
|
-
expect(actualOptions
|
|
603
|
-
expect(actualOptions
|
|
602
|
+
expect(actualOptions!.iv).toStrictEqual(options.iv)
|
|
603
|
+
expect(actualOptions!.algorithm).toBeUndefined()
|
|
604
604
|
|
|
605
605
|
verify(
|
|
606
606
|
sudoCryptoProviderMock.decryptWithSymmetricKeyName(
|
|
@@ -638,8 +638,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
638
638
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
639
639
|
expect(actualData).toStrictEqual(encrypted)
|
|
640
640
|
expect(actualOptions).toBeDefined()
|
|
641
|
-
expect(actualOptions
|
|
642
|
-
expect(actualOptions
|
|
641
|
+
expect(actualOptions!.iv).toStrictEqual(options.iv)
|
|
642
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
643
643
|
|
|
644
644
|
verify(
|
|
645
645
|
sudoCryptoProviderMock.decryptWithSymmetricKeyName(
|
|
@@ -707,8 +707,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
707
707
|
expect(actualKey).toStrictEqual(symmetricKey)
|
|
708
708
|
expect(actualData).toStrictEqual(encrypted)
|
|
709
709
|
expect(actualOptions).toBeDefined()
|
|
710
|
-
expect(actualOptions
|
|
711
|
-
expect(actualOptions
|
|
710
|
+
expect(actualOptions!.iv).toStrictEqual(iv)
|
|
711
|
+
expect(actualOptions!.algorithm).toBeUndefined()
|
|
712
712
|
|
|
713
713
|
verify(
|
|
714
714
|
sudoCryptoProviderMock.decryptWithSymmetricKey(
|
|
@@ -746,8 +746,8 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
746
746
|
expect(actualKey).toStrictEqual(symmetricKey)
|
|
747
747
|
expect(actualData).toStrictEqual(encrypted)
|
|
748
748
|
expect(actualOptions).toBeDefined()
|
|
749
|
-
expect(actualOptions
|
|
750
|
-
expect(actualOptions
|
|
749
|
+
expect(actualOptions!.iv).toStrictEqual(iv)
|
|
750
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
751
751
|
|
|
752
752
|
verify(
|
|
753
753
|
sudoCryptoProviderMock.decryptWithSymmetricKey(
|
|
@@ -811,7 +811,7 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
811
811
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
812
812
|
expect(actualData).toStrictEqual(decrypted)
|
|
813
813
|
expect(actualOptions).toBeDefined()
|
|
814
|
-
expect(actualOptions
|
|
814
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
815
815
|
|
|
816
816
|
verify(
|
|
817
817
|
sudoCryptoProviderMock.encryptWithPublicKey(
|
|
@@ -875,7 +875,7 @@ describe('DefaultSudoKeyManager', () => {
|
|
|
875
875
|
expect(actualKeyName).toStrictEqual('VpnKey')
|
|
876
876
|
expect(actualData).toStrictEqual(encrypted)
|
|
877
877
|
expect(actualOptions).toBeDefined()
|
|
878
|
-
expect(actualOptions
|
|
878
|
+
expect(actualOptions!.algorithm).toStrictEqual(options.algorithm)
|
|
879
879
|
|
|
880
880
|
verify(
|
|
881
881
|
sudoCryptoProviderMock.decryptWithPrivateKey(
|