Add documentation to pgp module.

This commit is contained in:
Spencer Ofwiti 2021-05-12 13:21:18 +03:00
parent 948a735baf
commit 948554563d
27 changed files with 3154 additions and 744 deletions

File diff suppressed because it is too large Load Diff

View File

@ -63,6 +63,13 @@
<code>src/app/_pgp/pgp-signer.ts</code>
</p>
<p class="comment">
<h3>Description</h3>
</p>
<p class="comment">
<p>Provides functionality for signing and verifying signed messages. </p>
</p>
<p class="comment">
@ -161,12 +168,14 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="34" class="link-to-prism">src/app/_pgp/pgp-signer.ts:34</a></div>
<div class="io-line">Defined in <a href="" data-line="74" class="link-to-prism">src/app/_pgp/pgp-signer.ts:74</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Initializing the Signer.</p>
</div>
<div>
<b>Parameters :</b>
<table class="params">
@ -175,6 +184,7 @@
<td>Name</td>
<td>Type</td>
<td>Optional</td>
<td>Description</td>
</tr>
</thead>
<tbody>
@ -189,6 +199,12 @@
No
</td>
<td>
<code><ul>
<li>A keystore holding pgp keys.</li>
</ul>
</code>
</td>
</tr>
</tbody>
</table>
@ -229,10 +245,16 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="28" class="link-to-prism">src/app/_pgp/pgp-signer.ts:28</a></div>
<div class="io-line">Defined in <a href="" data-line="62" class="link-to-prism">src/app/_pgp/pgp-signer.ts:62</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Encryption algorithm used </p>
</div>
</td>
</tr>
</tbody>
</table>
@ -256,10 +278,16 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="29" class="link-to-prism">src/app/_pgp/pgp-signer.ts:29</a></div>
<div class="io-line">Defined in <a href="" data-line="64" class="link-to-prism">src/app/_pgp/pgp-signer.ts:64</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Message digest </p>
</div>
</td>
</tr>
</tbody>
</table>
@ -288,10 +316,16 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="27" class="link-to-prism">src/app/_pgp/pgp-signer.ts:27</a></div>
<div class="io-line">Defined in <a href="" data-line="60" class="link-to-prism">src/app/_pgp/pgp-signer.ts:60</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Encryption engine used. </p>
</div>
</td>
</tr>
</tbody>
</table>
@ -315,10 +349,16 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="31" class="link-to-prism">src/app/_pgp/pgp-signer.ts:31</a></div>
<div class="io-line">Defined in <a href="" data-line="68" class="link-to-prism">src/app/_pgp/pgp-signer.ts:68</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>A keystore holding pgp keys. </p>
</div>
</td>
</tr>
</tbody>
</table>
@ -342,10 +382,16 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="34" class="link-to-prism">src/app/_pgp/pgp-signer.ts:34</a></div>
<div class="io-line">Defined in <a href="" data-line="74" class="link-to-prism">src/app/_pgp/pgp-signer.ts:74</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>A service that provides logging capabilities. </p>
</div>
</td>
</tr>
</tbody>
</table>
@ -369,10 +415,16 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="32" class="link-to-prism">src/app/_pgp/pgp-signer.ts:32</a></div>
<div class="io-line">Defined in <a href="" data-line="70" class="link-to-prism">src/app/_pgp/pgp-signer.ts:70</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Event triggered on successful signing of message. </p>
</div>
</td>
</tr>
</tbody>
</table>
@ -396,10 +448,16 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="33" class="link-to-prism">src/app/_pgp/pgp-signer.ts:33</a></div>
<div class="io-line">Defined in <a href="" data-line="72" class="link-to-prism">src/app/_pgp/pgp-signer.ts:72</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Event triggered on successful verification of a signature. </p>
</div>
</td>
</tr>
</tbody>
</table>
@ -423,10 +481,16 @@
</tr>
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="30" class="link-to-prism">src/app/_pgp/pgp-signer.ts:30</a></div>
<div class="io-line">Defined in <a href="" data-line="66" class="link-to-prism">src/app/_pgp/pgp-signer.ts:66</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Generated signature </p>
</div>
</td>
</tr>
</tbody>
</table>
@ -461,19 +525,27 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="42"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:42</a></div>
<div class="io-line">Defined in <a href="" data-line="90"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:90</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Get the private key fingerprint.</p>
</div>
<div>
</div>
<div class="io-description">
<b>Returns : </b> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
</div>
<div class="io-description">
<p>A private key fingerprint.</p>
</div>
</td>
</tr>
</tbody>
@ -502,14 +574,16 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="46"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:46</a></div>
<div class="io-line">Defined in <a href="" data-line="99"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:99</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Load the message digest.</p>
</div>
<div class="io-description">
<b>Parameters :</b>
@ -519,6 +593,7 @@
<td>Name</td>
<td>Type</td>
<td>Optional</td>
<td>Description</td>
</tr>
</thead>
<tbody>
@ -533,6 +608,12 @@
</td>
<td>
<ul>
<li>A signable object.</li>
</ul>
</td>
</tr>
</tbody>
</table>
@ -544,6 +625,7 @@
</div>
<div class="io-description">
<p>true - If digest has been loaded successfully.</p>
</div>
</td>
@ -575,14 +657,16 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="83"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:83</a></div>
<div class="io-line">Defined in <a href="" data-line="146"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:146</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Signs a message using a private key.</p>
</div>
<div class="io-description">
<b>Parameters :</b>
@ -592,6 +676,7 @@
<td>Name</td>
<td>Type</td>
<td>Optional</td>
<td>Description</td>
</tr>
</thead>
<tbody>
@ -606,6 +691,12 @@
</td>
<td>
<ul>
<li>The message to be signed.</li>
</ul>
</td>
</tr>
</tbody>
</table>
@ -647,14 +738,16 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="51"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:51</a></div>
<div class="io-line">Defined in <a href="" data-line="109"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:109</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Verify that signature is valid.</p>
</div>
<div class="io-description">
<b>Parameters :</b>
@ -664,6 +757,7 @@
<td>Name</td>
<td>Type</td>
<td>Optional</td>
<td>Description</td>
</tr>
</thead>
<tbody>
@ -678,6 +772,12 @@
</td>
<td>
<ul>
<li>The message that was signed.</li>
</ul>
</td>
</tr>
<tr>
<td>signature</td>
@ -690,6 +790,12 @@
</td>
<td>
<ul>
<li>The generated signature.</li>
</ul>
</td>
</tr>
</tbody>
</table>
@ -717,56 +823,113 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import * as openpgp from &#x27;openpgp&#x27;;
// Application imports
import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
import { LoggingService } from &#x27;@app/_services/logging.service&#x27;;
const openpgp &#x3D; require(&#x27;openpgp&#x27;);
/** Signable object interface */
interface Signable {
/** The message to be signed. */
digest(): string;
}
/** Signature object interface */
interface Signature {
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
algo: string;
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise&lt;void&gt;;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** Encryption algorithm used */
algo &#x3D; &#x27;sha256&#x27;;
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) &#x3D;&gt; void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) &#x3D;&gt; void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/**
* Initializing the Signer.
* @param keyStore - A keystore holding pgp keys.
*/
constructor(keyStore: MutableKeyStore) {
this.keyStore &#x3D; keyStore;
this.onsign &#x3D; (signature: Signature) &#x3D;&gt; {};
this.onverify &#x3D; (flag: boolean) &#x3D;&gt; {};
}
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
public fingerprint(): string {
return this.keyStore.getFingerprint();
}
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
public prepare(material: Signable): boolean {
this.dgst &#x3D; material.digest();
return true;
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
public verify(digest: string, signature: Signature): void {
openpgp.signature
.readArmored(signature.data)
@ -799,6 +962,11 @@ class PGPSigner implements Signer {
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
@ -830,6 +998,7 @@ class PGPSigner implements Signer {
}
}
/** @exports */
export { Signable, Signature, Signer, PGPSigner };
</code></pre>
</div>

View File

@ -676,100 +676,88 @@
<span class="coverage-count">(4/4)</span>
</td>
</tr>
<tr class="low">
<tr class="very-good">
<td>
<!-- miscellaneous -->
<a href="./classes/MutablePgpKeyStore.html">src/app/_pgp/pgp-key-store.ts</a>
</td>
<td>class</td>
<td>MutablePgpKeyStore</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/26)</span>
<td align="right" data-sort="100">
<span class="coverage-percent">100 %</span>
<span class="coverage-count">(26/26)</span>
</td>
</tr>
<tr class="low">
<tr class="very-good">
<td>
<!-- miscellaneous -->
<a href="./interfaces/MutableKeyStore.html">src/app/_pgp/pgp-key-store.ts</a>
</td>
<td>interface</td>
<td>MutableKeyStore</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/26)</span>
<td align="right" data-sort="100">
<span class="coverage-percent">100 %</span>
<span class="coverage-count">(26/26)</span>
</td>
</tr>
<tr class="low">
<tr class="very-good">
<td>
<!-- miscellaneous -->
<a href="./miscellaneous/variables.html#keyring">src/app/_pgp/pgp-key-store.ts</a>
</td>
<td>variable</td>
<td>keyring</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/1)</span>
<td align="right" data-sort="100">
<span class="coverage-percent">100 %</span>
<span class="coverage-count">(1/1)</span>
</td>
</tr>
<tr class="low">
<tr class="very-good">
<td>
<!-- miscellaneous -->
<a href="./classes/PGPSigner.html">src/app/_pgp/pgp-signer.ts</a>
</td>
<td>class</td>
<td>PGPSigner</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/14)</span>
<td align="right" data-sort="100">
<span class="coverage-percent">100 %</span>
<span class="coverage-count">(14/14)</span>
</td>
</tr>
<tr class="low">
<tr class="very-good">
<td>
<!-- miscellaneous -->
<a href="./interfaces/Signable.html">src/app/_pgp/pgp-signer.ts</a>
</td>
<td>interface</td>
<td>Signable</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/2)</span>
<td align="right" data-sort="100">
<span class="coverage-percent">100 %</span>
<span class="coverage-count">(2/2)</span>
</td>
</tr>
<tr class="low">
<tr class="very-good">
<td>
<!-- miscellaneous -->
<a href="./interfaces/Signature.html">src/app/_pgp/pgp-signer.ts</a>
</td>
<td>interface</td>
<td>Signature</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/5)</span>
<td align="right" data-sort="100">
<span class="coverage-percent">100 %</span>
<span class="coverage-count">(5/5)</span>
</td>
</tr>
<tr class="low">
<tr class="very-good">
<td>
<!-- miscellaneous -->
<a href="./interfaces/Signer.html">src/app/_pgp/pgp-signer.ts</a>
</td>
<td>interface</td>
<td>Signer</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/7)</span>
</td>
</tr>
<tr class="low">
<td>
<!-- miscellaneous -->
<a href="./miscellaneous/variables.html#openpgp">src/app/_pgp/pgp-signer.ts</a>
</td>
<td>variable</td>
<td>openpgp</td>
<td align="right" data-sort="0">
<span class="coverage-percent">0 %</span>
<span class="coverage-count">(0/1)</span>
<td align="right" data-sort="100">
<span class="coverage-percent">100 %</span>
<span class="coverage-count">(7/7)</span>
</td>
</tr>
<tr class="low">

View File

@ -1,9 +1,9 @@
<svg width="135" height="20" xmlns="http://www.w3.org/2000/svg">
<g>
<rect id="svg_1" height="20" width="130" y="0" x="0" stroke-width="1.5" stroke="#5d5d5d" fill="#5d5d5d" rx="7" ry="7"/>
<rect id="svg_2" height="20" width="40" y="0" x="92" stroke-width="1.5" stroke="#dab226" fill="#dab226" rx="7" ry="7"/>
<rect id="svg_3" height="20" width="22" y="0" x="92" stroke-width="1.5" stroke="#dab226" fill="#dab226"/>
<rect id="svg_2" height="20" width="40" y="0" x="92" stroke-width="1.5" stroke="#8fbd08" fill="#8fbd08" rx="7" ry="7"/>
<rect id="svg_3" height="20" width="22" y="0" x="92" stroke-width="1.5" stroke="#8fbd08" fill="#8fbd08"/>
<text xml:space="preserve" text-anchor="start" font-family="Helvetica, Arial, sans-serif" font-size="12" id="svg_4" y="14" x="6" stroke-width="0" stroke="#5d5d5d" fill="#ffffff">documentation</text>
<text xml:space="preserve" text-anchor="middle" font-family="Helvetica, Arial, sans-serif" font-size="12" id="svg_5" y="14" x="112" stroke-width="0" stroke="#5d5d5d" fill="#ffffff" style="text-anchor: middle">49%</text>
<text xml:space="preserve" text-anchor="middle" font-family="Helvetica, Arial, sans-serif" font-size="12" id="svg_5" y="14" x="112" stroke-width="0" stroke="#5d5d5d" fill="#ffffff" style="text-anchor: middle">56%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 894 B

After

Width:  |  Height:  |  Size: 894 B

File diff suppressed because it is too large Load Diff

View File

@ -64,6 +64,13 @@
<code>src/app/_pgp/pgp-signer.ts</code>
</p>
<p class="comment">
<h3>Description</h3>
</p>
<p class="comment">
<p>Signable object interface </p>
</p>
<section>
@ -115,14 +122,16 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="7"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:7</a></div>
<div class="io-line">Defined in <a href="" data-line="11"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:11</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>The message to be signed. </p>
</div>
<div class="io-description">
<b>Returns : </b> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
@ -138,56 +147,113 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import * as openpgp from &#x27;openpgp&#x27;;
// Application imports
import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
import { LoggingService } from &#x27;@app/_services/logging.service&#x27;;
const openpgp &#x3D; require(&#x27;openpgp&#x27;);
/** Signable object interface */
interface Signable {
/** The message to be signed. */
digest(): string;
}
/** Signature object interface */
interface Signature {
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
algo: string;
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise&lt;void&gt;;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** Encryption algorithm used */
algo &#x3D; &#x27;sha256&#x27;;
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) &#x3D;&gt; void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) &#x3D;&gt; void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/**
* Initializing the Signer.
* @param keyStore - A keystore holding pgp keys.
*/
constructor(keyStore: MutableKeyStore) {
this.keyStore &#x3D; keyStore;
this.onsign &#x3D; (signature: Signature) &#x3D;&gt; {};
this.onverify &#x3D; (flag: boolean) &#x3D;&gt; {};
}
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
public fingerprint(): string {
return this.keyStore.getFingerprint();
}
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
public prepare(material: Signable): boolean {
this.dgst &#x3D; material.digest();
return true;
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
public verify(digest: string, signature: Signature): void {
openpgp.signature
.readArmored(signature.data)
@ -220,6 +286,11 @@ class PGPSigner implements Signer {
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
@ -251,6 +322,7 @@ class PGPSigner implements Signer {
}
}
/** @exports */
export { Signable, Signature, Signer, PGPSigner };
</code></pre>
</div>

View File

@ -61,9 +61,16 @@
<h3>File</h3>
</p>
<p class="comment">
<code>src/app/_pgp/pgp-signer.ts</code>
<code>src/app/_models/account.ts</code>
</p>
<p class="comment">
<h3>Description</h3>
</p>
<p class="comment">
<p>Meta signature interface </p>
</p>
<section>
@ -128,6 +135,12 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Algorithm used </p>
</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-sm table-bordered">
@ -157,6 +170,12 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Data that was signed. </p>
</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-sm table-bordered">
@ -186,6 +205,12 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Message digest </p>
</div>
</td>
</tr>
</tbody>
</table>
<table class="table table-sm table-bordered">
@ -215,6 +240,12 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Encryption engine used. </p>
</div>
</td>
</tr>
</tbody>
</table>
</section>
@ -222,120 +253,149 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
import { LoggingService } from &#x27;@app/_services/logging.service&#x27;;
const openpgp &#x3D; require(&#x27;openpgp&#x27;);
interface Signable {
digest(): string;
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface AccountDetails {
/** Account registration day */
date_registered: number;
/** User&#x27;s gender */
gender: string;
/** Age of user */
age?: string;
/** Type of account */
type?: string;
/** Token balance on account */
balance?: number;
/** Account identifiers */
identities: {
evm: {
&#x27;bloxberg:8996&#x27;: string[];
&#x27;oldchain:1&#x27;: string[];
};
latitude: number;
longitude: number;
};
/** User&#x27;s location */
location: {
area?: string;
area_name: string;
area_type?: string;
};
/** Products or services provided by user. */
products: string[];
/** Business category of user. */
category?: string;
/** Personal identifying information of user */
vcard: {
email: [
{
value: string;
}
];
fn: [
{
value: string;
}
];
n: [
{
value: string[];
}
];
tel: [
{
meta: {
TYP: string[];
};
value: string;
}
];
version: [
{
value: string;
}
];
};
}
/** Meta signature interface */
interface Signature {
engine: string;
/** Algorithm used */
algo: string;
/** Data that was signed. */
data: string;
/** Message digest */
digest: string;
/** Encryption engine used. */
engine: string;
}
interface Signer {
onsign(signature: Signature): void;
onverify(flag: boolean): void;
fingerprint(): string;
prepare(material: Signable): boolean;
verify(digest: string, signature: Signature): void;
sign(digest: string): Promise&lt;void&gt;;
}
class PGPSigner implements Signer {
engine &#x3D; &#x27;pgp&#x27;;
algo &#x3D; &#x27;sha256&#x27;;
dgst: string;
/** Meta object interface */
interface Meta {
/** Account details */
data: AccountDetails;
/** Meta store id */
id: string;
/** Signature used during write. */
signature: Signature;
keyStore: MutableKeyStore;
onsign: (signature: Signature) &#x3D;&gt; void;
onverify: (flag: boolean) &#x3D;&gt; void;
loggingService: LoggingService;
constructor(keyStore: MutableKeyStore) {
this.keyStore &#x3D; keyStore;
this.onsign &#x3D; (signature: Signature) &#x3D;&gt; {};
this.onverify &#x3D; (flag: boolean) &#x3D;&gt; {};
}
public fingerprint(): string {
return this.keyStore.getFingerprint();
/** Meta response interface */
interface MetaResponse {
/** Meta store id */
id: string;
/** Meta object */
m: Meta;
}
public prepare(material: Signable): boolean {
this.dgst &#x3D; material.digest();
return true;
}
public verify(digest: string, signature: Signature): void {
openpgp.signature
.readArmored(signature.data)
.then((sig) &#x3D;&gt; {
const opts &#x3D; {
message: openpgp.cleartext.fromText(digest),
publicKeys: this.keyStore.getTrustedKeys(),
signature: sig,
/** Default account data object */
const defaultAccount: AccountDetails &#x3D; {
date_registered: Date.now(),
gender: &#x27;other&#x27;,
identities: {
evm: {
&#x27;bloxberg:8996&#x27;: [&#x27;&#x27;],
&#x27;oldchain:1&#x27;: [&#x27;&#x27;],
},
latitude: 0,
longitude: 0,
},
location: {
area_name: &#x27;Kilifi&#x27;,
},
products: [],
vcard: {
email: [
{
value: &#x27;&#x27;,
},
],
fn: [
{
value: &#x27;Sarafu Contract&#x27;,
},
],
n: [
{
value: [&#x27;Sarafu&#x27;, &#x27;Contract&#x27;],
},
],
tel: [
{
meta: {
TYP: [],
},
value: &#x27;&#x27;,
},
],
version: [
{
value: &#x27;3.0&#x27;,
},
],
},
};
openpgp.verify(opts).then((v) &#x3D;&gt; {
let i &#x3D; 0;
for (i &#x3D; 0; i &lt; v.signatures.length; i++) {
const s &#x3D; v.signatures[i];
if (s.valid) {
this.onverify(s);
return;
}
}
this.loggingService.sendErrorLevelMessage(
&#x60;Checked ${i} signature(s) but none valid&#x60;,
this,
{ error: &#x27;404 Not found!&#x27; }
);
this.onverify(false);
});
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onverify(false);
});
}
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
}
export { Signable, Signature, Signer, PGPSigner };
/** @exports */
export { AccountDetails, Meta, MetaResponse, Signature, defaultAccount };
</code></pre>
</div>
</div>

View File

@ -61,14 +61,14 @@
<h3>File</h3>
</p>
<p class="comment">
<code>src/app/_models/account.ts</code>
<code>src/app/_pgp/pgp-signer.ts</code>
</p>
<p class="comment">
<h3>Description</h3>
</p>
<p class="comment">
<p>Meta signature interface </p>
<p>Signature object interface </p>
</p>
@ -137,7 +137,7 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Algorithm used </p>
<div class="io-description"><p>Encryption algorithm used </p>
</div>
</td>
</tr>
@ -172,7 +172,7 @@
<tr>
<td class="col-md-4">
<div class="io-description"><p>Data that was signed. </p>
<div class="io-description"><p>Data to be signed. </p>
</div>
</td>
</tr>
@ -253,149 +253,183 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">interface AccountDetails {
/** Account registration day */
date_registered: number;
/** User&#x27;s gender */
gender: string;
/** Age of user */
age?: string;
/** Type of account */
type?: string;
/** Token balance on account */
balance?: number;
/** Account identifiers */
identities: {
evm: {
&#x27;bloxberg:8996&#x27;: string[];
&#x27;oldchain:1&#x27;: string[];
};
latitude: number;
longitude: number;
};
/** User&#x27;s location */
location: {
area?: string;
area_name: string;
area_type?: string;
};
/** Products or services provided by user. */
products: string[];
/** Business category of user. */
category?: string;
/** Personal identifying information of user */
vcard: {
email: [
{
value: string;
}
];
fn: [
{
value: string;
}
];
n: [
{
value: string[];
}
];
tel: [
{
meta: {
TYP: string[];
};
value: string;
}
];
version: [
{
value: string;
}
];
};
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import * as openpgp from &#x27;openpgp&#x27;;
// Application imports
import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
import { LoggingService } from &#x27;@app/_services/logging.service&#x27;;
/** Signable object interface */
interface Signable {
/** The message to be signed. */
digest(): string;
}
/** Meta signature interface */
/** Signature object interface */
interface Signature {
/** Algorithm used */
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
algo: string;
/** Data that was signed. */
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise&lt;void&gt;;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine: string;
}
/** Meta object interface */
interface Meta {
/** Account details */
data: AccountDetails;
/** Meta store id */
id: string;
/** Signature used during write. */
engine &#x3D; &#x27;pgp&#x27;;
/** Encryption algorithm used */
algo &#x3D; &#x27;sha256&#x27;;
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) &#x3D;&gt; void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) &#x3D;&gt; void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/**
* Initializing the Signer.
* @param keyStore - A keystore holding pgp keys.
*/
constructor(keyStore: MutableKeyStore) {
this.keyStore &#x3D; keyStore;
this.onsign &#x3D; (signature: Signature) &#x3D;&gt; {};
this.onverify &#x3D; (flag: boolean) &#x3D;&gt; {};
}
/** Meta response interface */
interface MetaResponse {
/** Meta store id */
id: string;
/** Meta object */
m: Meta;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
public fingerprint(): string {
return this.keyStore.getFingerprint();
}
/** Default account data object */
const defaultAccount: AccountDetails &#x3D; {
date_registered: Date.now(),
gender: &#x27;other&#x27;,
identities: {
evm: {
&#x27;bloxberg:8996&#x27;: [&#x27;&#x27;],
&#x27;oldchain:1&#x27;: [&#x27;&#x27;],
},
latitude: 0,
longitude: 0,
},
location: {
area_name: &#x27;Kilifi&#x27;,
},
products: [],
vcard: {
email: [
{
value: &#x27;&#x27;,
},
],
fn: [
{
value: &#x27;Sarafu Contract&#x27;,
},
],
n: [
{
value: [&#x27;Sarafu&#x27;, &#x27;Contract&#x27;],
},
],
tel: [
{
meta: {
TYP: [],
},
value: &#x27;&#x27;,
},
],
version: [
{
value: &#x27;3.0&#x27;,
},
],
},
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
public prepare(material: Signable): boolean {
this.dgst &#x3D; material.digest();
return true;
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
public verify(digest: string, signature: Signature): void {
openpgp.signature
.readArmored(signature.data)
.then((sig) &#x3D;&gt; {
const opts &#x3D; {
message: openpgp.cleartext.fromText(digest),
publicKeys: this.keyStore.getTrustedKeys(),
signature: sig,
};
openpgp.verify(opts).then((v) &#x3D;&gt; {
let i &#x3D; 0;
for (i &#x3D; 0; i &lt; v.signatures.length; i++) {
const s &#x3D; v.signatures[i];
if (s.valid) {
this.onverify(s);
return;
}
}
this.loggingService.sendErrorLevelMessage(
&#x60;Checked ${i} signature(s) but none valid&#x60;,
this,
{ error: &#x27;404 Not found!&#x27; }
);
this.onverify(false);
});
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onverify(false);
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
if (!pk.isDecrypted()) {
const password &#x3D; window.prompt(&#x27;password&#x27;);
await pk.decrypt(password);
}
const opts &#x3D; {
message: m,
privateKeys: [pk],
detached: true,
};
openpgp
.sign(opts)
.then((s) &#x3D;&gt; {
this.signature &#x3D; {
engine: this.engine,
algo: this.algo,
data: s.signature,
// TODO: fix for browser later
digest,
};
this.onsign(this.signature);
})
.catch((e) &#x3D;&gt; {
this.loggingService.sendErrorLevelMessage(e.message, this, { error: e });
this.onsign(undefined);
});
}
}
/** @exports */
export { AccountDetails, Meta, MetaResponse, Signature, defaultAccount };
export { Signable, Signature, Signer, PGPSigner };
</code></pre>
</div>
</div>

View File

@ -64,6 +64,13 @@
<code>src/app/_pgp/pgp-signer.ts</code>
</p>
<p class="comment">
<h3>Description</h3>
</p>
<p class="comment">
<p>Signer interface </p>
</p>
<section>
@ -130,19 +137,27 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="20"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:20</a></div>
<div class="io-line">Defined in <a href="" data-line="36"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:36</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Get the private key fingerprint.</p>
</div>
<div>
</div>
<div class="io-description">
<b>Returns : </b> <code><a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/string" target="_blank" >string</a></code>
</div>
<div class="io-description">
<p>A private key fingerprint.</p>
</div>
</td>
</tr>
</tbody>
@ -169,14 +184,16 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="18"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:18</a></div>
<div class="io-line">Defined in <a href="" data-line="29"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:29</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Event triggered on successful signing of message. </p>
</div>
<div class="io-description">
<b>Parameters :</b>
@ -239,14 +256,16 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="19"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:19</a></div>
<div class="io-line">Defined in <a href="" data-line="31"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:31</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Event triggered on successful verification of a signature. </p>
</div>
<div class="io-description">
<b>Parameters :</b>
@ -309,14 +328,16 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="21"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:21</a></div>
<div class="io-line">Defined in <a href="" data-line="42"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:42</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Load the message digest.</p>
</div>
<div class="io-description">
<b>Parameters :</b>
@ -326,6 +347,7 @@
<td>Name</td>
<td>Type</td>
<td>Optional</td>
<td>Description</td>
</tr>
</thead>
<tbody>
@ -340,6 +362,12 @@
</td>
<td>
<ul>
<li>A signable object.</li>
</ul>
</td>
</tr>
</tbody>
</table>
@ -351,6 +379,7 @@
</div>
<div class="io-description">
<p>true - If digest has been loaded successfully.</p>
</div>
</td>
@ -379,14 +408,16 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="23"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:23</a></div>
<div class="io-line">Defined in <a href="" data-line="54"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:54</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Signs a message using a private key.</p>
</div>
<div class="io-description">
<b>Parameters :</b>
@ -396,6 +427,7 @@
<td>Name</td>
<td>Type</td>
<td>Optional</td>
<td>Description</td>
</tr>
</thead>
<tbody>
@ -410,6 +442,12 @@
</td>
<td>
<ul>
<li>The message to be signed.</li>
</ul>
</td>
</tr>
</tbody>
</table>
@ -449,14 +487,16 @@
<tr>
<td class="col-md-4">
<div class="io-line">Defined in <a href="" data-line="22"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:22</a></div>
<div class="io-line">Defined in <a href="" data-line="48"
class="link-to-prism">src/app/_pgp/pgp-signer.ts:48</a></div>
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>Verify that signature is valid.</p>
</div>
<div class="io-description">
<b>Parameters :</b>
@ -466,6 +506,7 @@
<td>Name</td>
<td>Type</td>
<td>Optional</td>
<td>Description</td>
</tr>
</thead>
<tbody>
@ -480,6 +521,12 @@
</td>
<td>
<ul>
<li>The message that was signed.</li>
</ul>
</td>
</tr>
<tr>
<td>signature</td>
@ -492,6 +539,12 @@
</td>
<td>
<ul>
<li>The generated signature.</li>
</ul>
</td>
</tr>
</tbody>
</table>
@ -515,56 +568,113 @@
<div class="tab-pane fade tab-source-code" id="c-source">
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
<pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import * as openpgp from &#x27;openpgp&#x27;;
// Application imports
import { MutableKeyStore } from &#x27;@app/_pgp/pgp-key-store&#x27;;
import { LoggingService } from &#x27;@app/_services/logging.service&#x27;;
const openpgp &#x3D; require(&#x27;openpgp&#x27;);
/** Signable object interface */
interface Signable {
/** The message to be signed. */
digest(): string;
}
/** Signature object interface */
interface Signature {
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
algo: string;
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise&lt;void&gt;;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine &#x3D; &#x27;pgp&#x27;;
/** Encryption algorithm used */
algo &#x3D; &#x27;sha256&#x27;;
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) &#x3D;&gt; void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) &#x3D;&gt; void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/**
* Initializing the Signer.
* @param keyStore - A keystore holding pgp keys.
*/
constructor(keyStore: MutableKeyStore) {
this.keyStore &#x3D; keyStore;
this.onsign &#x3D; (signature: Signature) &#x3D;&gt; {};
this.onverify &#x3D; (flag: boolean) &#x3D;&gt; {};
}
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
public fingerprint(): string {
return this.keyStore.getFingerprint();
}
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
public prepare(material: Signable): boolean {
this.dgst &#x3D; material.digest();
return true;
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
public verify(digest: string, signature: Signature): void {
openpgp.signature
.readArmored(signature.data)
@ -597,6 +707,11 @@ class PGPSigner implements Signer {
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise&lt;void&gt; {
const m &#x3D; openpgp.cleartext.fromText(digest);
const pk &#x3D; this.keyStore.getPrivateKey();
@ -628,6 +743,7 @@ class PGPSigner implements Signer {
}
}
/** @exports */
export { Signable, Signature, Signer, PGPSigner };
</code></pre>
</div>

File diff suppressed because one or more lines are too long

View File

@ -102,9 +102,6 @@
<li>
<a href="#objCsv" title="src/app/_helpers/read-csv.ts"><b>objCsv</b>&nbsp;&nbsp;&nbsp;(src/.../read-csv.ts)</a>
</li>
<li>
<a href="#openpgp" title="src/app/_pgp/pgp-signer.ts"><b>openpgp</b>&nbsp;&nbsp;&nbsp;(src/.../pgp-signer.ts)</a>
</li>
<li>
<a href="#tokens" title="src/app/_helpers/mock-backend.ts"><b>tokens</b>&nbsp;&nbsp;&nbsp;(src/.../mock-backend.ts)</a>
</li>
@ -1843,6 +1840,12 @@
</td>
</tr>
<tr>
<td class="col-md-4">
<div class="io-description"><p>An openpgp Keyring instance. </p>
</div>
</td>
</tr>
</tbody>
</table>
@ -1886,30 +1889,6 @@
</tbody>
</table>
</section>
<h3>src/app/_pgp/pgp-signer.ts</h3>
<section>
<h3></h3> <table class="table table-sm table-bordered">
<tbody>
<tr>
<td class="col-md-4">
<a name="openpgp"></a>
<span class="name">
<b>
openpgp</b>
<a href="#openpgp"><span class="icon ion-ios-link"></span></a>
</span>
</td>
</tr>
<tr>
<td class="col-md-4">
<i>Default value : </i><code>require(&#x27;openpgp&#x27;)</code>
</td>
</tr>
</tbody>
</table>
</section>
<h3>src/app/_services/transaction.service.ts</h3>
<section>
<h3></h3> <table class="table table-sm table-bordered">

View File

@ -65,22 +65,22 @@
<title>cluster_AppModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 1186,-268 1186,-70 8,-70"/>
</g>
<g id="clust7" class="cluster">
<title>cluster_AppModule_providers</title>
<polygon fill="none" stroke="black" points="415,-78 415,-130 1178,-130 1178,-78 415,-78"/>
<g id="clust6" class="cluster">
<title>cluster_AppModule_bootstrap</title>
<polygon fill="none" stroke="black" points="584,-208 584,-260 708,-260 708,-208 584,-208"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_AppModule_imports</title>
<polygon fill="none" stroke="black" points="146,-78 146,-130 407,-130 407,-78 146,-78"/>
<polygon fill="none" stroke="black" points="917,-78 917,-130 1178,-130 1178,-78 917,-78"/>
</g>
<g id="clust7" class="cluster">
<title>cluster_AppModule_providers</title>
<polygon fill="none" stroke="black" points="146,-78 146,-130 909,-130 909,-78 146,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_AppModule_declarations</title>
<polygon fill="none" stroke="black" points="16,-78 16,-130 138,-130 138,-78 16,-78"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_AppModule_bootstrap</title>
<polygon fill="none" stroke="black" points="447,-208 447,-260 571,-260 571,-208 447,-208"/>
</g>
<!-- AppComponent -->
<g id="node1" class="node">
<title>AppComponent</title>
@ -90,98 +90,98 @@
<!-- AppModule -->
<g id="node2" class="node">
<title>AppModule</title>
<polygon fill="#8dd3c7" stroke="black" points="550.66,-187 547.66,-191 526.66,-191 523.66,-187 467.34,-187 467.34,-151 550.66,-151 550.66,-187"/>
<text text-anchor="middle" x="509" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
<polygon fill="#8dd3c7" stroke="black" points="687.66,-187 684.66,-191 663.66,-191 660.66,-187 604.34,-187 604.34,-151 687.66,-151 687.66,-187"/>
<text text-anchor="middle" x="646" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
</g>
<!-- AppComponent&#45;&gt;AppModule -->
<g id="edge1" class="edge">
<title>AppComponent&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M77,-122.29C77,-144.21 77,-178 77,-178 77,-178 457.19,-178 457.19,-178"/>
<polygon fill="black" stroke="black" points="457.19,-181.5 467.19,-178 457.19,-174.5 457.19,-181.5"/>
<path fill="none" stroke="black" d="M77,-122.29C77,-144.21 77,-178 77,-178 77,-178 594.16,-178 594.16,-178"/>
<polygon fill="black" stroke="black" points="594.16,-181.5 604.16,-178 594.16,-174.5 594.16,-181.5"/>
</g>
<!-- AppComponent -->
<g id="node5" class="node">
<title>AppComponent </title>
<polygon fill="#80b1d3" stroke="black" points="563.44,-252 454.56,-252 454.56,-216 563.44,-216 563.44,-252"/>
<text text-anchor="middle" x="509" y="-229.8" font-family="Times,serif" font-size="14.00">AppComponent </text>
<polygon fill="#80b1d3" stroke="black" points="700.44,-252 591.56,-252 591.56,-216 700.44,-216 700.44,-252"/>
<text text-anchor="middle" x="646" y="-229.8" font-family="Times,serif" font-size="14.00">AppComponent </text>
</g>
<!-- AppModule&#45;&gt;AppComponent -->
<g id="edge4" class="edge">
<title>AppModule&#45;&gt;AppComponent </title>
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M509,-187.11C509,-187.11 509,-205.99 509,-205.99"/>
<polygon fill="black" stroke="black" points="505.5,-205.99 509,-215.99 512.5,-205.99 505.5,-205.99"/>
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M646,-187.11C646,-187.11 646,-205.99 646,-205.99"/>
<polygon fill="black" stroke="black" points="642.5,-205.99 646,-215.99 649.5,-205.99 642.5,-205.99"/>
</g>
<!-- AppRoutingModule -->
<g id="node3" class="node">
<title>AppRoutingModule</title>
<polygon fill="#8dd3c7" stroke="black" points="399.27,-122 396.27,-126 375.27,-126 372.27,-122 270.73,-122 270.73,-86 399.27,-86 399.27,-122"/>
<text text-anchor="middle" x="335" y="-99.8" font-family="Times,serif" font-size="14.00">AppRoutingModule</text>
<polygon fill="#8dd3c7" stroke="black" points="1170.27,-122 1167.27,-126 1146.27,-126 1143.27,-122 1041.73,-122 1041.73,-86 1170.27,-86 1170.27,-122"/>
<text text-anchor="middle" x="1106" y="-99.8" font-family="Times,serif" font-size="14.00">AppRoutingModule</text>
</g>
<!-- AppRoutingModule&#45;&gt;AppModule -->
<g id="edge2" class="edge">
<title>AppRoutingModule&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M335,-122.03C335,-138.4 335,-160 335,-160 335,-160 457.32,-160 457.32,-160"/>
<polygon fill="black" stroke="black" points="457.32,-163.5 467.32,-160 457.32,-156.5 457.32,-163.5"/>
<path fill="none" stroke="black" d="M1106,-122.29C1106,-144.21 1106,-178 1106,-178 1106,-178 698.04,-178 698.04,-178"/>
<polygon fill="black" stroke="black" points="698.04,-174.5 688.04,-178 698.04,-181.5 698.04,-174.5"/>
</g>
<!-- SharedModule -->
<g id="node4" class="node">
<title>SharedModule</title>
<polygon fill="#8dd3c7" stroke="black" points="252.42,-122 249.42,-126 228.42,-126 225.42,-122 153.58,-122 153.58,-86 252.42,-86 252.42,-122"/>
<text text-anchor="middle" x="203" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
<polygon fill="#8dd3c7" stroke="black" points="1023.42,-122 1020.42,-126 999.42,-126 996.42,-122 924.58,-122 924.58,-86 1023.42,-86 1023.42,-122"/>
<text text-anchor="middle" x="974" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
</g>
<!-- SharedModule&#45;&gt;AppModule -->
<g id="edge3" class="edge">
<title>SharedModule&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M203,-122.11C203,-141.34 203,-169 203,-169 203,-169 457.09,-169 457.09,-169"/>
<polygon fill="black" stroke="black" points="457.09,-172.5 467.09,-169 457.09,-165.5 457.09,-172.5"/>
<path fill="none" stroke="black" d="M974,-122.11C974,-141.34 974,-169 974,-169 974,-169 697.87,-169 697.87,-169"/>
<polygon fill="black" stroke="black" points="697.87,-165.5 687.87,-169 697.87,-172.5 697.87,-165.5"/>
</g>
<!-- ErrorInterceptor -->
<g id="node6" class="node">
<title>ErrorInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="1096" cy="-104" rx="73.53" ry="18"/>
<text text-anchor="middle" x="1096" y="-99.8" font-family="Times,serif" font-size="14.00">ErrorInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="827" cy="-104" rx="73.53" ry="18"/>
<text text-anchor="middle" x="827" y="-99.8" font-family="Times,serif" font-size="14.00">ErrorInterceptor</text>
</g>
<!-- ErrorInterceptor&#45;&gt;AppModule -->
<g id="edge5" class="edge">
<title>ErrorInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M1096,-122.29C1096,-144.21 1096,-178 1096,-178 1096,-178 560.75,-178 560.75,-178"/>
<polygon fill="black" stroke="black" points="560.75,-174.5 550.75,-178 560.74,-181.5 560.75,-174.5"/>
<path fill="none" stroke="black" d="M827,-122.03C827,-138.4 827,-160 827,-160 827,-160 697.98,-160 697.98,-160"/>
<polygon fill="black" stroke="black" points="697.98,-156.5 687.98,-160 697.98,-163.5 697.98,-156.5"/>
</g>
<!-- GlobalErrorHandler -->
<g id="node7" class="node">
<title>GlobalErrorHandler</title>
<ellipse fill="#fdb462" stroke="black" cx="915" cy="-104" rx="88.58" ry="18"/>
<text text-anchor="middle" x="915" y="-99.8" font-family="Times,serif" font-size="14.00">GlobalErrorHandler</text>
<ellipse fill="#fdb462" stroke="black" cx="646" cy="-104" rx="88.58" ry="18"/>
<text text-anchor="middle" x="646" y="-99.8" font-family="Times,serif" font-size="14.00">GlobalErrorHandler</text>
</g>
<!-- GlobalErrorHandler&#45;&gt;AppModule -->
<g id="edge6" class="edge">
<title>GlobalErrorHandler&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M915,-122.11C915,-141.34 915,-169 915,-169 915,-169 560.92,-169 560.92,-169"/>
<polygon fill="black" stroke="black" points="560.92,-165.5 550.92,-169 560.92,-172.5 560.92,-165.5"/>
<path fill="none" stroke="black" d="M646,-122.11C646,-122.11 646,-140.99 646,-140.99"/>
<polygon fill="black" stroke="black" points="642.5,-140.99 646,-150.99 649.5,-140.99 642.5,-140.99"/>
</g>
<!-- HttpConfigInterceptor -->
<g id="node8" class="node">
<title>HttpConfigInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="711" cy="-104" rx="97.27" ry="18"/>
<text text-anchor="middle" x="711" y="-99.8" font-family="Times,serif" font-size="14.00">HttpConfigInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="442" cy="-104" rx="97.27" ry="18"/>
<text text-anchor="middle" x="442" y="-99.8" font-family="Times,serif" font-size="14.00">HttpConfigInterceptor</text>
</g>
<!-- HttpConfigInterceptor&#45;&gt;AppModule -->
<g id="edge7" class="edge">
<title>HttpConfigInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M711,-122.03C711,-138.4 711,-160 711,-160 711,-160 560.85,-160 560.85,-160"/>
<polygon fill="black" stroke="black" points="560.85,-156.5 550.85,-160 560.85,-163.5 560.85,-156.5"/>
<path fill="none" stroke="black" d="M442,-122.03C442,-138.4 442,-160 442,-160 442,-160 594.23,-160 594.23,-160"/>
<polygon fill="black" stroke="black" points="594.23,-163.5 604.23,-160 594.23,-156.5 594.23,-163.5"/>
</g>
<!-- LoggingInterceptor -->
<g id="node9" class="node">
<title>LoggingInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="509" cy="-104" rx="86.24" ry="18"/>
<text text-anchor="middle" x="509" y="-99.8" font-family="Times,serif" font-size="14.00">LoggingInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="240" cy="-104" rx="86.24" ry="18"/>
<text text-anchor="middle" x="240" y="-99.8" font-family="Times,serif" font-size="14.00">LoggingInterceptor</text>
</g>
<!-- LoggingInterceptor&#45;&gt;AppModule -->
<g id="edge8" class="edge">
<title>LoggingInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M509,-122.11C509,-122.11 509,-140.99 509,-140.99"/>
<polygon fill="black" stroke="black" points="505.5,-140.99 509,-150.99 512.5,-140.99 505.5,-140.99"/>
<path fill="none" stroke="black" d="M240,-122.11C240,-141.34 240,-169 240,-169 240,-169 594.08,-169 594.08,-169"/>
<polygon fill="black" stroke="black" points="594.08,-172.5 604.08,-169 594.08,-165.5 594.08,-172.5"/>
</g>
</g>
</svg>

View File

@ -24,22 +24,22 @@
<title>cluster_AppModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 1186,-268 1186,-70 8,-70"/>
</g>
<g id="clust7" class="cluster">
<title>cluster_AppModule_providers</title>
<polygon fill="none" stroke="black" points="415,-78 415,-130 1178,-130 1178,-78 415,-78"/>
<g id="clust6" class="cluster">
<title>cluster_AppModule_bootstrap</title>
<polygon fill="none" stroke="black" points="584,-208 584,-260 708,-260 708,-208 584,-208"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_AppModule_imports</title>
<polygon fill="none" stroke="black" points="146,-78 146,-130 407,-130 407,-78 146,-78"/>
<polygon fill="none" stroke="black" points="917,-78 917,-130 1178,-130 1178,-78 917,-78"/>
</g>
<g id="clust7" class="cluster">
<title>cluster_AppModule_providers</title>
<polygon fill="none" stroke="black" points="146,-78 146,-130 909,-130 909,-78 146,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_AppModule_declarations</title>
<polygon fill="none" stroke="black" points="16,-78 16,-130 138,-130 138,-78 16,-78"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_AppModule_bootstrap</title>
<polygon fill="none" stroke="black" points="447,-208 447,-260 571,-260 571,-208 447,-208"/>
</g>
<!-- AppComponent -->
<g id="node1" class="node">
<title>AppComponent</title>
@ -49,98 +49,98 @@
<!-- AppModule -->
<g id="node2" class="node">
<title>AppModule</title>
<polygon fill="#8dd3c7" stroke="black" points="550.66,-187 547.66,-191 526.66,-191 523.66,-187 467.34,-187 467.34,-151 550.66,-151 550.66,-187"/>
<text text-anchor="middle" x="509" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
<polygon fill="#8dd3c7" stroke="black" points="687.66,-187 684.66,-191 663.66,-191 660.66,-187 604.34,-187 604.34,-151 687.66,-151 687.66,-187"/>
<text text-anchor="middle" x="646" y="-164.8" font-family="Times,serif" font-size="14.00">AppModule</text>
</g>
<!-- AppComponent&#45;&gt;AppModule -->
<g id="edge1" class="edge">
<title>AppComponent&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M77,-122.29C77,-144.21 77,-178 77,-178 77,-178 457.19,-178 457.19,-178"/>
<polygon fill="black" stroke="black" points="457.19,-181.5 467.19,-178 457.19,-174.5 457.19,-181.5"/>
<path fill="none" stroke="black" d="M77,-122.29C77,-144.21 77,-178 77,-178 77,-178 594.16,-178 594.16,-178"/>
<polygon fill="black" stroke="black" points="594.16,-181.5 604.16,-178 594.16,-174.5 594.16,-181.5"/>
</g>
<!-- AppComponent -->
<g id="node5" class="node">
<title>AppComponent </title>
<polygon fill="#80b1d3" stroke="black" points="563.44,-252 454.56,-252 454.56,-216 563.44,-216 563.44,-252"/>
<text text-anchor="middle" x="509" y="-229.8" font-family="Times,serif" font-size="14.00">AppComponent </text>
<polygon fill="#80b1d3" stroke="black" points="700.44,-252 591.56,-252 591.56,-216 700.44,-216 700.44,-252"/>
<text text-anchor="middle" x="646" y="-229.8" font-family="Times,serif" font-size="14.00">AppComponent </text>
</g>
<!-- AppModule&#45;&gt;AppComponent -->
<g id="edge4" class="edge">
<title>AppModule&#45;&gt;AppComponent </title>
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M509,-187.11C509,-187.11 509,-205.99 509,-205.99"/>
<polygon fill="black" stroke="black" points="505.5,-205.99 509,-215.99 512.5,-205.99 505.5,-205.99"/>
<path fill="none" stroke="black" stroke-dasharray="1,5" d="M646,-187.11C646,-187.11 646,-205.99 646,-205.99"/>
<polygon fill="black" stroke="black" points="642.5,-205.99 646,-215.99 649.5,-205.99 642.5,-205.99"/>
</g>
<!-- AppRoutingModule -->
<g id="node3" class="node">
<title>AppRoutingModule</title>
<polygon fill="#8dd3c7" stroke="black" points="399.27,-122 396.27,-126 375.27,-126 372.27,-122 270.73,-122 270.73,-86 399.27,-86 399.27,-122"/>
<text text-anchor="middle" x="335" y="-99.8" font-family="Times,serif" font-size="14.00">AppRoutingModule</text>
<polygon fill="#8dd3c7" stroke="black" points="1170.27,-122 1167.27,-126 1146.27,-126 1143.27,-122 1041.73,-122 1041.73,-86 1170.27,-86 1170.27,-122"/>
<text text-anchor="middle" x="1106" y="-99.8" font-family="Times,serif" font-size="14.00">AppRoutingModule</text>
</g>
<!-- AppRoutingModule&#45;&gt;AppModule -->
<g id="edge2" class="edge">
<title>AppRoutingModule&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M335,-122.03C335,-138.4 335,-160 335,-160 335,-160 457.32,-160 457.32,-160"/>
<polygon fill="black" stroke="black" points="457.32,-163.5 467.32,-160 457.32,-156.5 457.32,-163.5"/>
<path fill="none" stroke="black" d="M1106,-122.29C1106,-144.21 1106,-178 1106,-178 1106,-178 698.04,-178 698.04,-178"/>
<polygon fill="black" stroke="black" points="698.04,-174.5 688.04,-178 698.04,-181.5 698.04,-174.5"/>
</g>
<!-- SharedModule -->
<g id="node4" class="node">
<title>SharedModule</title>
<polygon fill="#8dd3c7" stroke="black" points="252.42,-122 249.42,-126 228.42,-126 225.42,-122 153.58,-122 153.58,-86 252.42,-86 252.42,-122"/>
<text text-anchor="middle" x="203" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
<polygon fill="#8dd3c7" stroke="black" points="1023.42,-122 1020.42,-126 999.42,-126 996.42,-122 924.58,-122 924.58,-86 1023.42,-86 1023.42,-122"/>
<text text-anchor="middle" x="974" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
</g>
<!-- SharedModule&#45;&gt;AppModule -->
<g id="edge3" class="edge">
<title>SharedModule&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M203,-122.11C203,-141.34 203,-169 203,-169 203,-169 457.09,-169 457.09,-169"/>
<polygon fill="black" stroke="black" points="457.09,-172.5 467.09,-169 457.09,-165.5 457.09,-172.5"/>
<path fill="none" stroke="black" d="M974,-122.11C974,-141.34 974,-169 974,-169 974,-169 697.87,-169 697.87,-169"/>
<polygon fill="black" stroke="black" points="697.87,-165.5 687.87,-169 697.87,-172.5 697.87,-165.5"/>
</g>
<!-- ErrorInterceptor -->
<g id="node6" class="node">
<title>ErrorInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="1096" cy="-104" rx="73.53" ry="18"/>
<text text-anchor="middle" x="1096" y="-99.8" font-family="Times,serif" font-size="14.00">ErrorInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="827" cy="-104" rx="73.53" ry="18"/>
<text text-anchor="middle" x="827" y="-99.8" font-family="Times,serif" font-size="14.00">ErrorInterceptor</text>
</g>
<!-- ErrorInterceptor&#45;&gt;AppModule -->
<g id="edge5" class="edge">
<title>ErrorInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M1096,-122.29C1096,-144.21 1096,-178 1096,-178 1096,-178 560.75,-178 560.75,-178"/>
<polygon fill="black" stroke="black" points="560.75,-174.5 550.75,-178 560.74,-181.5 560.75,-174.5"/>
<path fill="none" stroke="black" d="M827,-122.03C827,-138.4 827,-160 827,-160 827,-160 697.98,-160 697.98,-160"/>
<polygon fill="black" stroke="black" points="697.98,-156.5 687.98,-160 697.98,-163.5 697.98,-156.5"/>
</g>
<!-- GlobalErrorHandler -->
<g id="node7" class="node">
<title>GlobalErrorHandler</title>
<ellipse fill="#fdb462" stroke="black" cx="915" cy="-104" rx="88.58" ry="18"/>
<text text-anchor="middle" x="915" y="-99.8" font-family="Times,serif" font-size="14.00">GlobalErrorHandler</text>
<ellipse fill="#fdb462" stroke="black" cx="646" cy="-104" rx="88.58" ry="18"/>
<text text-anchor="middle" x="646" y="-99.8" font-family="Times,serif" font-size="14.00">GlobalErrorHandler</text>
</g>
<!-- GlobalErrorHandler&#45;&gt;AppModule -->
<g id="edge6" class="edge">
<title>GlobalErrorHandler&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M915,-122.11C915,-141.34 915,-169 915,-169 915,-169 560.92,-169 560.92,-169"/>
<polygon fill="black" stroke="black" points="560.92,-165.5 550.92,-169 560.92,-172.5 560.92,-165.5"/>
<path fill="none" stroke="black" d="M646,-122.11C646,-122.11 646,-140.99 646,-140.99"/>
<polygon fill="black" stroke="black" points="642.5,-140.99 646,-150.99 649.5,-140.99 642.5,-140.99"/>
</g>
<!-- HttpConfigInterceptor -->
<g id="node8" class="node">
<title>HttpConfigInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="711" cy="-104" rx="97.27" ry="18"/>
<text text-anchor="middle" x="711" y="-99.8" font-family="Times,serif" font-size="14.00">HttpConfigInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="442" cy="-104" rx="97.27" ry="18"/>
<text text-anchor="middle" x="442" y="-99.8" font-family="Times,serif" font-size="14.00">HttpConfigInterceptor</text>
</g>
<!-- HttpConfigInterceptor&#45;&gt;AppModule -->
<g id="edge7" class="edge">
<title>HttpConfigInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M711,-122.03C711,-138.4 711,-160 711,-160 711,-160 560.85,-160 560.85,-160"/>
<polygon fill="black" stroke="black" points="560.85,-156.5 550.85,-160 560.85,-163.5 560.85,-156.5"/>
<path fill="none" stroke="black" d="M442,-122.03C442,-138.4 442,-160 442,-160 442,-160 594.23,-160 594.23,-160"/>
<polygon fill="black" stroke="black" points="594.23,-163.5 604.23,-160 594.23,-156.5 594.23,-163.5"/>
</g>
<!-- LoggingInterceptor -->
<g id="node9" class="node">
<title>LoggingInterceptor</title>
<ellipse fill="#fdb462" stroke="black" cx="509" cy="-104" rx="86.24" ry="18"/>
<text text-anchor="middle" x="509" y="-99.8" font-family="Times,serif" font-size="14.00">LoggingInterceptor</text>
<ellipse fill="#fdb462" stroke="black" cx="240" cy="-104" rx="86.24" ry="18"/>
<text text-anchor="middle" x="240" y="-99.8" font-family="Times,serif" font-size="14.00">LoggingInterceptor</text>
</g>
<!-- LoggingInterceptor&#45;&gt;AppModule -->
<g id="edge8" class="edge">
<title>LoggingInterceptor&#45;&gt;AppModule</title>
<path fill="none" stroke="black" d="M509,-122.11C509,-122.11 509,-140.99 509,-140.99"/>
<polygon fill="black" stroke="black" points="505.5,-140.99 509,-150.99 512.5,-140.99 505.5,-140.99"/>
<path fill="none" stroke="black" d="M240,-122.11C240,-141.34 240,-169 240,-169 240,-169 594.08,-169 594.08,-169"/>
<polygon fill="black" stroke="black" points="594.08,-172.5 604.08,-169 594.08,-165.5 594.08,-172.5"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -65,55 +65,55 @@
<title>cluster_PagesModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="36,-70 36,-195 460,-195 460,-70 36,-70"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_PagesModule_imports</title>
<polygon fill="none" stroke="black" points="182,-78 182,-130 452,-130 452,-78 182,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_PagesModule_declarations</title>
<polygon fill="none" stroke="black" points="44,-78 44,-130 174,-130 174,-78 44,-78"/>
<polygon fill="none" stroke="black" points="322,-78 322,-130 452,-130 452,-78 322,-78"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_PagesModule_imports</title>
<polygon fill="none" stroke="black" points="44,-78 44,-130 314,-130 314,-78 44,-78"/>
</g>
<!-- PagesComponent -->
<g id="node1" class="node">
<title>PagesComponent</title>
<polygon fill="#ffffb3" stroke="black" points="165.99,-122 52.01,-122 52.01,-86 165.99,-86 165.99,-122"/>
<text text-anchor="middle" x="109" y="-99.8" font-family="Times,serif" font-size="14.00">PagesComponent</text>
<polygon fill="#ffffb3" stroke="black" points="443.99,-122 330.01,-122 330.01,-86 443.99,-86 443.99,-122"/>
<text text-anchor="middle" x="387" y="-99.8" font-family="Times,serif" font-size="14.00">PagesComponent</text>
</g>
<!-- PagesModule -->
<g id="node2" class="node">
<title>PagesModule</title>
<polygon fill="#8dd3c7" stroke="black" points="285.21,-187 282.21,-191 261.21,-191 258.21,-187 192.79,-187 192.79,-151 285.21,-151 285.21,-187"/>
<text text-anchor="middle" x="239" y="-164.8" font-family="Times,serif" font-size="14.00">PagesModule</text>
<polygon fill="#8dd3c7" stroke="black" points="283.21,-187 280.21,-191 259.21,-191 256.21,-187 190.79,-187 190.79,-151 283.21,-151 283.21,-187"/>
<text text-anchor="middle" x="237" y="-164.8" font-family="Times,serif" font-size="14.00">PagesModule</text>
</g>
<!-- PagesComponent&#45;&gt;PagesModule -->
<g id="edge1" class="edge">
<title>PagesComponent&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M109,-122.11C109,-141.34 109,-169 109,-169 109,-169 182.8,-169 182.8,-169"/>
<polygon fill="black" stroke="black" points="182.8,-172.5 192.8,-169 182.8,-165.5 182.8,-172.5"/>
<path fill="none" stroke="black" d="M387,-122.11C387,-141.34 387,-169 387,-169 387,-169 293.23,-169 293.23,-169"/>
<polygon fill="black" stroke="black" points="293.23,-165.5 283.23,-169 293.23,-172.5 293.23,-165.5"/>
</g>
<!-- PagesRoutingModule -->
<g id="node3" class="node">
<title>PagesRoutingModule</title>
<polygon fill="#8dd3c7" stroke="black" points="443.82,-122 440.82,-126 419.82,-126 416.82,-122 306.18,-122 306.18,-86 443.82,-86 443.82,-122"/>
<text text-anchor="middle" x="375" y="-99.8" font-family="Times,serif" font-size="14.00">PagesRoutingModule</text>
<polygon fill="#8dd3c7" stroke="black" points="305.82,-122 302.82,-126 281.82,-126 278.82,-122 168.18,-122 168.18,-86 305.82,-86 305.82,-122"/>
<text text-anchor="middle" x="237" y="-99.8" font-family="Times,serif" font-size="14.00">PagesRoutingModule</text>
</g>
<!-- PagesRoutingModule&#45;&gt;PagesModule -->
<g id="edge2" class="edge">
<title>PagesRoutingModule&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M375,-122.11C375,-141.34 375,-169 375,-169 375,-169 295.42,-169 295.42,-169"/>
<polygon fill="black" stroke="black" points="295.42,-165.5 285.42,-169 295.42,-172.5 295.42,-165.5"/>
<path fill="none" stroke="black" d="M237,-122.11C237,-122.11 237,-140.99 237,-140.99"/>
<polygon fill="black" stroke="black" points="233.5,-140.99 237,-150.99 240.5,-140.99 233.5,-140.99"/>
</g>
<!-- SharedModule -->
<g id="node4" class="node">
<title>SharedModule</title>
<polygon fill="#8dd3c7" stroke="black" points="288.42,-122 285.42,-126 264.42,-126 261.42,-122 189.58,-122 189.58,-86 288.42,-86 288.42,-122"/>
<text text-anchor="middle" x="239" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
<polygon fill="#8dd3c7" stroke="black" points="150.42,-122 147.42,-126 126.42,-126 123.42,-122 51.58,-122 51.58,-86 150.42,-86 150.42,-122"/>
<text text-anchor="middle" x="101" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
</g>
<!-- SharedModule&#45;&gt;PagesModule -->
<g id="edge3" class="edge">
<title>SharedModule&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M239,-122.11C239,-122.11 239,-140.99 239,-140.99"/>
<polygon fill="black" stroke="black" points="235.5,-140.99 239,-150.99 242.5,-140.99 235.5,-140.99"/>
<path fill="none" stroke="black" d="M101,-122.11C101,-141.34 101,-169 101,-169 101,-169 180.58,-169 180.58,-169"/>
<polygon fill="black" stroke="black" points="180.58,-172.5 190.58,-169 180.58,-165.5 180.58,-172.5"/>
</g>
</g>
</svg>

View File

@ -24,55 +24,55 @@
<title>cluster_PagesModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="36,-70 36,-195 460,-195 460,-70 36,-70"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_PagesModule_imports</title>
<polygon fill="none" stroke="black" points="182,-78 182,-130 452,-130 452,-78 182,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_PagesModule_declarations</title>
<polygon fill="none" stroke="black" points="44,-78 44,-130 174,-130 174,-78 44,-78"/>
<polygon fill="none" stroke="black" points="322,-78 322,-130 452,-130 452,-78 322,-78"/>
</g>
<g id="clust4" class="cluster">
<title>cluster_PagesModule_imports</title>
<polygon fill="none" stroke="black" points="44,-78 44,-130 314,-130 314,-78 44,-78"/>
</g>
<!-- PagesComponent -->
<g id="node1" class="node">
<title>PagesComponent</title>
<polygon fill="#ffffb3" stroke="black" points="165.99,-122 52.01,-122 52.01,-86 165.99,-86 165.99,-122"/>
<text text-anchor="middle" x="109" y="-99.8" font-family="Times,serif" font-size="14.00">PagesComponent</text>
<polygon fill="#ffffb3" stroke="black" points="443.99,-122 330.01,-122 330.01,-86 443.99,-86 443.99,-122"/>
<text text-anchor="middle" x="387" y="-99.8" font-family="Times,serif" font-size="14.00">PagesComponent</text>
</g>
<!-- PagesModule -->
<g id="node2" class="node">
<title>PagesModule</title>
<polygon fill="#8dd3c7" stroke="black" points="285.21,-187 282.21,-191 261.21,-191 258.21,-187 192.79,-187 192.79,-151 285.21,-151 285.21,-187"/>
<text text-anchor="middle" x="239" y="-164.8" font-family="Times,serif" font-size="14.00">PagesModule</text>
<polygon fill="#8dd3c7" stroke="black" points="283.21,-187 280.21,-191 259.21,-191 256.21,-187 190.79,-187 190.79,-151 283.21,-151 283.21,-187"/>
<text text-anchor="middle" x="237" y="-164.8" font-family="Times,serif" font-size="14.00">PagesModule</text>
</g>
<!-- PagesComponent&#45;&gt;PagesModule -->
<g id="edge1" class="edge">
<title>PagesComponent&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M109,-122.11C109,-141.34 109,-169 109,-169 109,-169 182.8,-169 182.8,-169"/>
<polygon fill="black" stroke="black" points="182.8,-172.5 192.8,-169 182.8,-165.5 182.8,-172.5"/>
<path fill="none" stroke="black" d="M387,-122.11C387,-141.34 387,-169 387,-169 387,-169 293.23,-169 293.23,-169"/>
<polygon fill="black" stroke="black" points="293.23,-165.5 283.23,-169 293.23,-172.5 293.23,-165.5"/>
</g>
<!-- PagesRoutingModule -->
<g id="node3" class="node">
<title>PagesRoutingModule</title>
<polygon fill="#8dd3c7" stroke="black" points="443.82,-122 440.82,-126 419.82,-126 416.82,-122 306.18,-122 306.18,-86 443.82,-86 443.82,-122"/>
<text text-anchor="middle" x="375" y="-99.8" font-family="Times,serif" font-size="14.00">PagesRoutingModule</text>
<polygon fill="#8dd3c7" stroke="black" points="305.82,-122 302.82,-126 281.82,-126 278.82,-122 168.18,-122 168.18,-86 305.82,-86 305.82,-122"/>
<text text-anchor="middle" x="237" y="-99.8" font-family="Times,serif" font-size="14.00">PagesRoutingModule</text>
</g>
<!-- PagesRoutingModule&#45;&gt;PagesModule -->
<g id="edge2" class="edge">
<title>PagesRoutingModule&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M375,-122.11C375,-141.34 375,-169 375,-169 375,-169 295.42,-169 295.42,-169"/>
<polygon fill="black" stroke="black" points="295.42,-165.5 285.42,-169 295.42,-172.5 295.42,-165.5"/>
<path fill="none" stroke="black" d="M237,-122.11C237,-122.11 237,-140.99 237,-140.99"/>
<polygon fill="black" stroke="black" points="233.5,-140.99 237,-150.99 240.5,-140.99 233.5,-140.99"/>
</g>
<!-- SharedModule -->
<g id="node4" class="node">
<title>SharedModule</title>
<polygon fill="#8dd3c7" stroke="black" points="288.42,-122 285.42,-126 264.42,-126 261.42,-122 189.58,-122 189.58,-86 288.42,-86 288.42,-122"/>
<text text-anchor="middle" x="239" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
<polygon fill="#8dd3c7" stroke="black" points="150.42,-122 147.42,-126 126.42,-126 123.42,-122 51.58,-122 51.58,-86 150.42,-86 150.42,-122"/>
<text text-anchor="middle" x="101" y="-99.8" font-family="Times,serif" font-size="14.00">SharedModule</text>
</g>
<!-- SharedModule&#45;&gt;PagesModule -->
<g id="edge3" class="edge">
<title>SharedModule&#45;&gt;PagesModule</title>
<path fill="none" stroke="black" d="M239,-122.11C239,-122.11 239,-140.99 239,-140.99"/>
<polygon fill="black" stroke="black" points="235.5,-140.99 239,-150.99 242.5,-140.99 235.5,-140.99"/>
<path fill="none" stroke="black" d="M101,-122.11C101,-141.34 101,-169 101,-169 101,-169 180.58,-169 180.58,-169"/>
<polygon fill="black" stroke="black" points="180.58,-172.5 190.58,-169 180.58,-165.5 180.58,-172.5"/>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -65,14 +65,14 @@
<title>cluster_TransactionsModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 714,-268 714,-70 8,-70"/>
</g>
<g id="clust5" class="cluster">
<title>cluster_TransactionsModule_imports</title>
<polygon fill="none" stroke="black" points="398,-78 398,-130 706,-130 706,-78 398,-78"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_TransactionsModule_exports</title>
<polygon fill="none" stroke="black" points="288,-208 288,-260 494,-260 494,-208 288,-208"/>
</g>
<g id="clust5" class="cluster">
<title>cluster_TransactionsModule_imports</title>
<polygon fill="none" stroke="black" points="398,-78 398,-130 706,-130 706,-78 398,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_TransactionsModule_declarations</title>
<polygon fill="none" stroke="black" points="16,-78 16,-130 390,-130 390,-78 16,-78"/>

View File

@ -24,14 +24,14 @@
<title>cluster_TransactionsModule</title>
<polygon fill="none" stroke="black" stroke-dasharray="1,5" points="8,-70 8,-268 714,-268 714,-70 8,-70"/>
</g>
<g id="clust5" class="cluster">
<title>cluster_TransactionsModule_imports</title>
<polygon fill="none" stroke="black" points="398,-78 398,-130 706,-130 706,-78 398,-78"/>
</g>
<g id="clust6" class="cluster">
<title>cluster_TransactionsModule_exports</title>
<polygon fill="none" stroke="black" points="288,-208 288,-260 494,-260 494,-208 288,-208"/>
</g>
<g id="clust5" class="cluster">
<title>cluster_TransactionsModule_imports</title>
<polygon fill="none" stroke="black" points="398,-78 398,-130 706,-130 706,-78 398,-78"/>
</g>
<g id="clust2" class="cluster">
<title>cluster_TransactionsModule_declarations</title>
<polygon fill="none" stroke="black" points="16,-78 16,-130 390,-130 390,-78 16,-78"/>

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -68,6 +68,14 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<dl class="tsd-comment-tags">
<dt>exports</dt>
<dd></dd>
</dl>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@ -155,9 +163,14 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#clearkeysinkeyring">clearKeysInKeyring</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:152</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:408</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Remove all keys from the keyring.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
@ -173,10 +186,22 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getencryptkeys">getEncryptKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:68</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:250</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all the encryption keys.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Current implementation doesn&#39;t include encryption keys.
This is included to appease the implemented Keystore interface.</p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of encryption keys.</p>
</li>
</ul>
</section>
@ -191,10 +216,16 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getfingerprint">getFingerprint</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:96</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:302</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get the first private key&#39;s fingerprint.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>The first private key&#39;s fingerprint.</p>
</li>
</ul>
</section>
@ -209,16 +240,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getkeyid">getKeyId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:106</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:317</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get a key&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>key: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The key to fetch the keyId from.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>The key&#39;s keyId.</p>
</li>
</ul>
</section>
@ -233,16 +273,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getkeysforid">getKeysForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:119</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:339</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get keys from the keyring using their keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the keys to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of the keys with that keyId.</p>
</li>
</ul>
</section>
@ -257,10 +306,16 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getprivatekey">getPrivateKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:76</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:266</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get the first private key.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The first private key.</p>
</li>
</ul>
</section>
@ -275,16 +330,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getprivatekeyforid">getPrivateKeyForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:127</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:357</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get a private key from the keyring using it&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the private key to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The private key with that keyId.</p>
</li>
</ul>
</section>
@ -299,10 +363,16 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getprivatekeyid">getPrivateKeyId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:110</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:325</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get the first private key&#39;s keyID.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>The first private key&#39;s keyId.</p>
</li>
</ul>
</section>
@ -317,10 +387,16 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getprivatekeys">getPrivateKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:72</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:258</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all private keys.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of all private keys.</p>
</li>
</ul>
</section>
@ -335,16 +411,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getpublickeyforid">getPublicKeyForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:123</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:348</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get a public key from the keyring using it&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the public key to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The public key with that keyId.</p>
</li>
</ul>
</section>
@ -359,16 +444,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getpublickeyforsubkeyid">getPublicKeyForSubkeyId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:131</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:366</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get a public key from the keyring using it&#39;s subkeyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>subkeyId: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The subkeyId of the public key to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The public key with that subkeyId.</p>
</li>
</ul>
</section>
@ -383,10 +477,16 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getpublickeys">getPublicKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:56</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:223</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all the public keys.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of public keys.</p>
</li>
</ul>
</section>
@ -401,16 +501,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#getpublickeysforaddress">getPublicKeysForAddress</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:135</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:375</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get public keys from the keyring using their address.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>address: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The address of the public keys to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of the public keys with that address.</p>
</li>
</ul>
</section>
@ -425,10 +534,16 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#gettrustedactivekeys">getTrustedActiveKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:64</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:239</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all the trusted active keys.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of trusted active keys.</p>
</li>
</ul>
</section>
@ -443,10 +558,16 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#gettrustedkeys">getTrustedKeys</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:60</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:231</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all the trusted keys.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of trusted keys.</p>
</li>
</ul>
</section>
@ -461,16 +582,34 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#importkeypair">importKeyPair</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:43</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:182</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Add a key pair to keyring.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
<dt>throws</dt>
<dd><p>Error</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>publicKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The public key to be added to the keyring.</p>
</div>
</li>
<li>
<h5>privateKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The private key to be added to the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -488,13 +627,28 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#importprivatekey">importPrivateKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:52</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:211</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Add private key to keyring.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
<dt>throws</dt>
<dd><p>Error</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>privateKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The private key to be added to the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -505,23 +659,38 @@
<a name="importpublickey" class="tsd-anchor"></a>
<h3>import<wbr>Public<wbr>Key</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">import<wbr>Public<wbr>Key<span class="tsd-signature-symbol">(</span>publicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-signature tsd-kind-icon">import<wbr>Public<wbr>Key<span class="tsd-signature-symbol">(</span>publicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</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">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#importpublickey">importPublicKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:48</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:197</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Add public key to keyring.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
<dt>throws</dt>
<dd><p>Error</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>publicKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The public key to be added to the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
@ -536,16 +705,29 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#isencryptedprivatekey">isEncryptedPrivateKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:86</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:288</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Verify that a private key is encrypted.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>privateKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The private key to verify.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>true - If private key is encrypted.</p>
</li>
</ul>
</section>
@ -560,16 +742,29 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#isvalidkey">isValidKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:80</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:276</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Test if the input is a valid key.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>key: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The input to be validated.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>true - If the input is a valid key.</p>
</li>
</ul>
</section>
@ -584,9 +779,18 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#loadkeyring">loadKeyring</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:38</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:170</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Instantiate the keyring in the keystore.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
@ -602,16 +806,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#removekeysforid">removeKeysForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:139</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:384</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Remove a public key from the keyring using it&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the keys to be removed from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of the removed keys.</p>
</li>
</ul>
</section>
@ -626,16 +839,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#removepublickey">removePublicKey</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:147</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:402</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Remove a public key from the keyring.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>publicKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The public key to be removed from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The removed public key.</p>
</li>
</ul>
</section>
@ -650,16 +872,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#removepublickeyforid">removePublicKeyForId</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:143</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:393</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Remove a public key from the keyring using it&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the public key to be removed from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The removed public key.</p>
</li>
</ul>
</section>
@ -674,16 +905,29 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html">MutableKeyStore</a>.<a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html#sign">sign</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:156</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:418</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Sign message using private key.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>plainText: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The message to be signed.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>The generated signature.</p>
</li>
</ul>
</section>

View File

@ -68,6 +68,14 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<dl class="tsd-comment-tags">
<dt>exports</dt>
<dd></dd>
</dl>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@ -129,13 +137,21 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:34</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:74</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Initializing the Signer.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyStore: <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html" class="tsd-signature-type" data-tsd-kind="Interface">MutableKeyStore</a></h5>
<div class="tsd-comment tsd-typography">
<p>A keystore holding pgp keys.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="app__pgp_pgp_signer.pgpsigner.html" class="tsd-signature-type" data-tsd-kind="Class">PGPSigner</a></h4>
@ -151,9 +167,14 @@
<div class="tsd-signature tsd-kind-icon">algo<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#x27;sha256&#x27;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:28</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:62</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Encryption algorithm used</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="dgst" class="tsd-anchor"></a>
@ -161,9 +182,14 @@
<div class="tsd-signature tsd-kind-icon">dgst<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:29</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:64</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Message digest</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="engine" class="tsd-anchor"></a>
@ -171,9 +197,14 @@
<div class="tsd-signature tsd-kind-icon">engine<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#x27;pgp&#x27;</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:27</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:60</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Encryption engine used.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="keystore" class="tsd-anchor"></a>
@ -181,9 +212,14 @@
<div class="tsd-signature tsd-kind-icon">key<wbr>Store<span class="tsd-signature-symbol">:</span> <a href="../interfaces/app__pgp_pgp_key_store.mutablekeystore.html" class="tsd-signature-type" data-tsd-kind="Interface">MutableKeyStore</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:31</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:68</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>A keystore holding pgp keys.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="loggingservice" class="tsd-anchor"></a>
@ -191,9 +227,14 @@
<div class="tsd-signature tsd-kind-icon">logging<wbr>Service<span class="tsd-signature-symbol">:</span> <a href="app__services_logging_service.loggingservice.html" class="tsd-signature-type" data-tsd-kind="Class">LoggingService</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:34</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:74</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>A service that provides logging capabilities.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="onsign" class="tsd-anchor"></a>
@ -202,9 +243,14 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_signer.signer.html">Signer</a>.<a href="../interfaces/app__pgp_pgp_signer.signer.html#onsign">onsign</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:32</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:70</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Event triggered on successful signing of message.</p>
</div>
</div>
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
<ul class="tsd-parameters">
@ -234,9 +280,14 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_signer.signer.html">Signer</a>.<a href="../interfaces/app__pgp_pgp_signer.signer.html#onverify">onverify</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:33</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:72</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Event triggered on successful verification of a signature.</p>
</div>
</div>
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
<ul class="tsd-parameters">
@ -265,9 +316,14 @@
<div class="tsd-signature tsd-kind-icon">signature<span class="tsd-signature-symbol">:</span> <a href="../interfaces/app__pgp_pgp_signer.signature.html" class="tsd-signature-type" data-tsd-kind="Interface">Signature</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:30</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:66</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Generated signature</p>
</div>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
@ -283,10 +339,16 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_signer.signer.html">Signer</a>.<a href="../interfaces/app__pgp_pgp_signer.signer.html#fingerprint">fingerprint</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:42</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:90</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get the private key fingerprint.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>A private key fingerprint.</p>
</li>
</ul>
</section>
@ -301,16 +363,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_signer.signer.html">Signer</a>.<a href="../interfaces/app__pgp_pgp_signer.signer.html#prepare">prepare</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:46</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:99</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Load the message digest.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>material: <a href="../interfaces/app__pgp_pgp_signer.signable.html" class="tsd-signature-type" data-tsd-kind="Interface">Signable</a></h5>
<div class="tsd-comment tsd-typography">
<p>A signable object.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>true - If digest has been loaded successfully.</p>
</li>
</ul>
</section>
@ -325,13 +396,25 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_signer.signer.html">Signer</a>.<a href="../interfaces/app__pgp_pgp_signer.signer.html#sign">sign</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:83</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:146</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Signs a message using a private key.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>digest: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The message to be signed.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -349,16 +432,27 @@
<aside class="tsd-sources">
<p>Implementation of <a href="../interfaces/app__pgp_pgp_signer.signer.html">Signer</a>.<a href="../interfaces/app__pgp_pgp_signer.signer.html#verify">verify</a></p>
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:51</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:109</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Verify that signature is valid.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>digest: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The message that was signed.</p>
</div>
</li>
<li>
<h5>signature: <a href="../interfaces/app__pgp_pgp_signer.signature.html" class="tsd-signature-type" data-tsd-kind="Interface">Signature</a></h5>
<div class="tsd-comment tsd-typography">
<p>The generated signature.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>

View File

@ -68,6 +68,14 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<dl class="tsd-comment-tags">
<dt>exports</dt>
<dd></dd>
</dl>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@ -136,9 +144,14 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:33</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:154</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Remove all keys from the keyring.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
@ -154,10 +167,22 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getEncryptKeys</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:17</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:64</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all the encryption keys.</p>
</div>
<dl class="tsd-comment-tags">
<dt>remarks</dt>
<dd><p>Current implementation doesn&#39;t include encryption keys.
This is included to appease the implemented Keystore interface.</p>
</dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of encryption keys.</p>
</li>
</ul>
</section>
@ -172,10 +197,16 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getFingerprint</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:22</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:93</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get the first private key&#39;s fingerprint.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>The first private key&#39;s fingerprint.</p>
</li>
</ul>
</section>
@ -189,16 +220,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:23</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:99</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get a key&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>key: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The key to fetch the keyId from.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>The key&#39;s keyId.</p>
</li>
</ul>
</section>
@ -212,16 +252,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:25</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:110</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get keys from the keyring using their keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the keys to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of the keys with that keyId.</p>
</li>
</ul>
</section>
@ -236,10 +285,16 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getPrivateKey</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:19</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:74</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get the first private key.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The first private key.</p>
</li>
</ul>
</section>
@ -253,16 +308,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:27</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:122</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get a private key from the keyring using it&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the private key to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The private key with that keyId.</p>
</li>
</ul>
</section>
@ -276,10 +340,16 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:24</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:104</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get the first private key&#39;s keyID.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>The first private key&#39;s keyId.</p>
</li>
</ul>
</section>
@ -293,10 +363,16 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:18</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:69</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all private keys.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of all private keys.</p>
</li>
</ul>
</section>
@ -310,16 +386,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:26</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:116</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get a public key from the keyring using it&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the public key to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The public key with that keyId.</p>
</li>
</ul>
</section>
@ -333,16 +418,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:28</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:128</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get a public key from the keyring using it&#39;s subkeyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>subkeyId: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The subkeyId of the public key to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The public key with that subkeyId.</p>
</li>
</ul>
</section>
@ -356,10 +450,16 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:14</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:46</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all the public keys.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of public keys.</p>
</li>
</ul>
</section>
@ -373,16 +473,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:29</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:134</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get public keys from the keyring using their address.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>address: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The address of the public keys to be fetched from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of the public keys with that address.</p>
</li>
</ul>
</section>
@ -397,10 +506,16 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getTrustedActiveKeys</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:16</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:56</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all the trusted active keys.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of trusted active keys.</p>
</li>
</ul>
</section>
@ -415,10 +530,16 @@
<aside class="tsd-sources">
<p>Overrides KeyStore.getTrustedKeys</p>
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:15</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:51</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get all the trusted keys.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of trusted keys.</p>
</li>
</ul>
</section>
@ -432,16 +553,34 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:11</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:27</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Add a key pair to keyring.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
<dt>throws</dt>
<dd><p>Error</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>publicKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The public key to be added to the keyring.</p>
</div>
</li>
<li>
<h5>privateKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The private key to be added to the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -458,13 +597,28 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:13</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:41</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Add private key to keyring.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
<dt>throws</dt>
<dd><p>Error</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>privateKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The private key to be added to the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -475,22 +629,37 @@
<a name="importpublickey" class="tsd-anchor"></a>
<h3>import<wbr>Public<wbr>Key</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-interface">
<li class="tsd-signature tsd-kind-icon">import<wbr>Public<wbr>Key<span class="tsd-signature-symbol">(</span>publicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
<li class="tsd-signature tsd-kind-icon">import<wbr>Public<wbr>Key<span class="tsd-signature-symbol">(</span>publicKey<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</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">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:12</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:34</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Add public key to keyring.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
<dt>throws</dt>
<dd><p>Error</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>publicKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The public key to be added to the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
</li>
</ul>
</section>
@ -504,16 +673,29 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:21</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:88</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Verify that a private key is encrypted.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>privateKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The private key to verify.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>true - If private key is encrypted.</p>
</li>
</ul>
</section>
@ -527,16 +709,29 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:20</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:81</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Test if the input is a valid key.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>key: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The input to be validated.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>true - If the input is a valid key.</p>
</li>
</ul>
</section>
@ -550,9 +745,18 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:10</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:19</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Instantiate the keyring in the keystore.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
@ -567,16 +771,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:30</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:140</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Remove a public key from the keyring using it&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the keys to be removed from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
<p>An array of the removed keys.</p>
</li>
</ul>
</section>
@ -590,16 +803,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:32</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:152</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Remove a public key from the keyring.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>publicKey: <span class="tsd-signature-type">any</span></h5>
<div class="tsd-comment tsd-typography">
<p>The public key to be removed from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The removed public key.</p>
</li>
</ul>
</section>
@ -613,16 +835,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:31</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:146</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Remove a public key from the keyring using it&#39;s keyId.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>keyId: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The keyId of the public key to be removed from the keyring.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>The removed public key.</p>
</li>
</ul>
</section>
@ -636,16 +867,29 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-key-store.ts:34</li>
<li>Defined in src/app/_pgp/pgp-key-store.ts:161</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Sign message using private key.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>plainText: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The message to be signed.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4>
<p>The generated signature.</p>
</li>
</ul>
</section>

View File

@ -68,6 +68,14 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<dl class="tsd-comment-tags">
<dt>exports</dt>
<dd></dd>
</dl>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@ -101,9 +109,14 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:7</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:11</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>The message to be signed.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
</li>
</ul>

View File

@ -68,6 +68,14 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<dl class="tsd-comment-tags">
<dt>exports</dt>
<dd></dd>
</dl>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@ -100,9 +108,14 @@
<div class="tsd-signature tsd-kind-icon">algo<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:12</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:19</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Encryption algorithm used</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="data" class="tsd-anchor"></a>
@ -110,9 +123,14 @@
<div class="tsd-signature tsd-kind-icon">data<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:13</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:21</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Data to be signed.</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="digest" class="tsd-anchor"></a>
@ -120,9 +138,14 @@
<div class="tsd-signature tsd-kind-icon">digest<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:14</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:23</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Message digest</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
<a name="engine" class="tsd-anchor"></a>
@ -130,9 +153,14 @@
<div class="tsd-signature tsd-kind-icon">engine<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:11</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:17</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Encryption engine used.</p>
</div>
</div>
</section>
</section>
</div>

View File

@ -68,6 +68,14 @@
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<dl class="tsd-comment-tags">
<dt>exports</dt>
<dd></dd>
</dl>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
@ -112,10 +120,16 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:20</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:36</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Get the private key fingerprint.</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
<p>A private key fingerprint.</p>
</li>
</ul>
</section>
@ -129,9 +143,14 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:18</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:29</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Event triggered on successful signing of message.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
@ -152,9 +171,14 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:19</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:31</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Event triggered on successful verification of a signature.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
@ -175,16 +199,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:21</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:42</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Load the message digest.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>material: <a href="app__pgp_pgp_signer.signable.html" class="tsd-signature-type" data-tsd-kind="Interface">Signable</a></h5>
<div class="tsd-comment tsd-typography">
<p>A signable object.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
<p>true - If digest has been loaded successfully.</p>
</li>
</ul>
</section>
@ -198,13 +231,25 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:23</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:54</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Signs a message using a private key.</p>
</div>
<dl class="tsd-comment-tags">
<dt>async</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>digest: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The message to be signed.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4>
@ -221,16 +266,27 @@
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in src/app/_pgp/pgp-signer.ts:22</li>
<li>Defined in src/app/_pgp/pgp-signer.ts:48</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Verify that signature is valid.</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>digest: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>The message that was signed.</p>
</div>
</li>
<li>
<h5>signature: <a href="app__pgp_pgp_signer.signature.html" class="tsd-signature-type" data-tsd-kind="Interface">Signature</a></h5>
<div class="tsd-comment tsd-typography">
<p>The generated signature.</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>

View File

@ -1,3 +1,4 @@
// Application imports
import { MutablePgpKeyStore } from '@app/_pgp/pgp-key-store';
describe('PgpKeyStore', () => {

View File

@ -1,88 +1,290 @@
// Third party imports
import { KeyStore } from 'cic-client-meta';
// TODO should we put this on the mutable key store object
import * as openpgp from 'openpgp';
/** An openpgp Keyring instance. */
const keyring = new openpgp.Keyring();
/**
* @extends
* Mutable Key store interface.
*
* @extends KeyStore
*/
interface MutableKeyStore extends KeyStore {
/**
* Instantiate the keyring in the keystore.
* @async
*/
loadKeyring(): void;
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importKeyPair(publicKey: any, privateKey: any): Promise<void>;
importPublicKey(publicKey: any): void;
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
importPublicKey(publicKey: any): Promise<void>;
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
importPrivateKey(privateKey: any): Promise<void>;
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array<any>;
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array<any>;
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array<any>;
/**
* Get all the encryption keys.
* @returns An array of encryption keys.
* @remarks
* Current implementation doesn't include encryption keys.
* This is included to appease the implemented Keystore interface.
*/
getEncryptKeys(): Array<any>;
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array<any>;
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any;
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
isValidKey(key: any): Promise<boolean>;
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
isEncryptedPrivateKey(privateKey: any): Promise<boolean>;
/**
* Get the first private key's fingerprint.
* @returns The first private key's fingerprint.
*/
getFingerprint(): string;
/**
* Get a key's keyId.
* @param key - The key to fetch the keyId from.
* @returns The key's keyId.
*/
getKeyId(key: any): string;
/**
* Get the first private key's keyID.
* @returns The first private key's keyId.
*/
getPrivateKeyId(): string;
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
* @returns An array of the keys with that keyId.
*/
getKeysForId(keyId: string): Array<any>;
/**
* Get a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be fetched from the keyring.
* @returns The public key with that keyId.
*/
getPublicKeyForId(keyId: string): any;
/**
* Get a private key from the keyring using it's keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId: string): any;
/**
* Get a public key from the keyring using it's subkeyId.
* @param subkeyId - The subkeyId of the public key to be fetched from the keyring.
* @returns The public key with that subkeyId.
*/
getPublicKeyForSubkeyId(subkeyId: string): any;
/**
* Get public keys from the keyring using their address.
* @param address - The address of the public keys to be fetched from the keyring.
* @returns An array of the public keys with that address.
*/
getPublicKeysForAddress(address: string): Array<any>;
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the keys to be removed from the keyring.
* @returns An array of the removed keys.
*/
removeKeysForId(keyId: string): Array<any>;
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId: string): any;
/**
* Remove a public key from the keyring.
* @param publicKey - The public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKey(publicKey: any): any;
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void;
/**
* Sign message using private key.
* @async
* @param plainText - The message to be signed.
* @returns The generated signature.
*/
sign(plainText: string): Promise<any>;
}
/** Provides a keyring for pgp keys. */
class MutablePgpKeyStore implements MutableKeyStore {
/**
* Instantiate the keyring in the keystore.
* @async
*/
async loadKeyring(): Promise<void> {
await keyring.load();
await keyring.store();
}
/**
* Add a key pair to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importKeyPair(publicKey: any, privateKey: any): Promise<void> {
try {
await keyring.publicKeys.importKey(publicKey);
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
importPublicKey(publicKey: any): void {
keyring.publicKeys.importKey(publicKey);
/**
* Add public key to keyring.
* @async
* @param publicKey - The public key to be added to the keyring.
* @throws Error
*/
async importPublicKey(publicKey: any): Promise<void> {
try {
await keyring.publicKeys.importKey(publicKey);
} catch (error) {
throw error;
}
}
/**
* Add private key to keyring.
* @async
* @param privateKey - The private key to be added to the keyring.
* @throws Error
*/
async importPrivateKey(privateKey: any): Promise<void> {
try {
await keyring.privateKeys.importKey(privateKey);
} catch (error) {
throw error;
}
}
/**
* Get all the public keys.
* @returns An array of public keys.
*/
getPublicKeys(): Array<any> {
return keyring.publicKeys.keys;
return keyring.publicKeys && keyring.publicKeys.keys;
}
/**
* Get all the trusted keys.
* @returns An array of trusted keys.
*/
getTrustedKeys(): Array<any> {
return keyring.publicKeys.keys;
return keyring.publicKeys && keyring.publicKeys.keys;
}
/**
* Get all the trusted active keys.
* @returns An array of trusted active keys.
*/
getTrustedActiveKeys(): Array<any> {
return keyring.publicKeys.keys;
return keyring.publicKeys && keyring.publicKeys.keys;
}
/**
* Get all the encryption keys.
* @returns An array of encryption keys.
* @remarks
* Current implementation doesn't include encryption keys.
* This is included to appease the implemented Keystore interface.
*/
getEncryptKeys(): Array<any> {
return [];
}
/**
* Get all private keys.
* @returns An array of all private keys.
*/
getPrivateKeys(): Array<any> {
return keyring.privateKeys.keys;
return keyring.privateKeys && keyring.privateKeys.keys;
}
/**
* Get the first private key.
* @returns The first private key.
*/
getPrivateKey(): any {
return keyring.privateKeys && keyring.privateKeys.keys[0];
}
/**
* Test if the input is a valid key.
* @async
* @param key - The input to be validated.
* @returns true - If the input is a valid key.
*/
async isValidKey(key): Promise<boolean> {
// There is supposed to be an openpgp.readKey() method but I can't find it?
const testKey = await openpgp.key.readArmored(key);
return !testKey.err;
}
/**
* Verify that a private key is encrypted.
* @async
* @param privateKey - The private key to verify.
* @returns true - If private key is encrypted.
*/
async isEncryptedPrivateKey(privateKey: any): Promise<boolean> {
const imported = await openpgp.key.readArmored(privateKey);
for (const key of imported.keys) {
@ -93,6 +295,10 @@ class MutablePgpKeyStore implements MutableKeyStore {
return true;
}
/**
* Get the first private key's fingerprint.
* @returns The first private key's fingerprint.
*/
getFingerprint(): string {
// TODO Handle multiple keys
return (
@ -103,10 +309,19 @@ class MutablePgpKeyStore implements MutableKeyStore {
);
}
/**
* Get a key's keyId.
* @param key - The key to fetch the keyId from.
* @returns The key's keyId.
*/
getKeyId(key: any): string {
return key.getKeyId().toHex();
}
/**
* Get the first private key's keyID.
* @returns The first private key's keyId.
*/
getPrivateKeyId(): string {
// TODO is there a library that comes with angular for doing this?
return (
@ -116,43 +331,90 @@ class MutablePgpKeyStore implements MutableKeyStore {
);
}
/**
* Get keys from the keyring using their keyId.
* @param keyId - The keyId of the keys to be fetched from the keyring.
* @returns An array of the keys with that keyId.
*/
getKeysForId(keyId: string): Array<any> {
return keyring.getKeysForId(keyId);
}
/**
* Get a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be fetched from the keyring.
* @returns The public key with that keyId.
*/
getPublicKeyForId(keyId): any {
return keyring.publicKeys.getForId(keyId);
return keyring.publicKeys && keyring.publicKeys.getForId(keyId);
}
/**
* Get a private key from the keyring using it's keyId.
* @param keyId - The keyId of the private key to be fetched from the keyring.
* @returns The private key with that keyId.
*/
getPrivateKeyForId(keyId): any {
return keyring.privateKeys.getForId(keyId);
return keyring.privateKeys && keyring.privateKeys.getForId(keyId);
}
/**
* Get a public key from the keyring using it's subkeyId.
* @param subkeyId - The subkeyId of the public key to be fetched from the keyring.
* @returns The public key with that subkeyId.
*/
getPublicKeyForSubkeyId(subkeyId): any {
return keyring.publicKeys.getForId(subkeyId, true);
return keyring.publicKeys && keyring.publicKeys.getForId(subkeyId, true);
}
/**
* Get public keys from the keyring using their address.
* @param address - The address of the public keys to be fetched from the keyring.
* @returns An array of the public keys with that address.
*/
getPublicKeysForAddress(address): Array<any> {
return keyring.publicKeys.getForAddress(address);
return keyring.publicKeys && keyring.publicKeys.getForAddress(address);
}
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the keys to be removed from the keyring.
* @returns An array of the removed keys.
*/
removeKeysForId(keyId): Array<any> {
return keyring.removeKeysForId(keyId);
}
/**
* Remove a public key from the keyring using it's keyId.
* @param keyId - The keyId of the public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKeyForId(keyId): any {
return keyring.publicKeys.removeForId(keyId);
return keyring.publicKeys && keyring.publicKeys.removeForId(keyId);
}
/**
* Remove a public key from the keyring.
* @param publicKey - The public key to be removed from the keyring.
* @returns The removed public key.
*/
removePublicKey(publicKey: any): any {
const keyId = publicKey.getKeyId().toHex();
return keyring.publicKeys.removeForId(keyId);
return keyring.publicKeys && keyring.publicKeys.removeForId(keyId);
}
/** Remove all keys from the keyring. */
clearKeysInKeyring(): void {
keyring.clear();
}
/**
* Sign message using private key.
* @async
* @param plainText - The message to be signed.
* @returns The generated signature.
*/
async sign(plainText): Promise<any> {
const privateKey = this.getPrivateKey();
if (!privateKey.isDecrypted()) {
@ -169,4 +431,5 @@ class MutablePgpKeyStore implements MutableKeyStore {
}
}
/** @exports */
export { MutablePgpKeyStore, MutableKeyStore };

View File

@ -1,5 +1,7 @@
import { PGPSigner } from '@app/_pgp/pgp-signer';
// Application imports
import { MutableKeyStore, MutablePgpKeyStore } from '@app/_pgp/pgp-key-store';
import { PGPSigner } from '@app/_pgp/pgp-signer';
const keystore: MutableKeyStore = new MutablePgpKeyStore();
describe('PgpSigner', () => {

View File

@ -1,53 +1,111 @@
// Third party imports
import * as openpgp from 'openpgp';
// Application imports
import { MutableKeyStore } from '@app/_pgp/pgp-key-store';
import { LoggingService } from '@app/_services/logging.service';
const openpgp = require('openpgp');
/** Signable object interface */
interface Signable {
/** The message to be signed. */
digest(): string;
}
/** Signature object interface */
interface Signature {
/** Encryption engine used. */
engine: string;
/** Encryption algorithm used */
algo: string;
/** Data to be signed. */
data: string;
/** Message digest */
digest: string;
}
/** Signer interface */
interface Signer {
/** Event triggered on successful signing of message. */
onsign(signature: Signature): void;
/** Event triggered on successful verification of a signature. */
onverify(flag: boolean): void;
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
fingerprint(): string;
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
prepare(material: Signable): boolean;
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
verify(digest: string, signature: Signature): void;
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
sign(digest: string): Promise<void>;
}
/** Provides functionality for signing and verifying signed messages. */
class PGPSigner implements Signer {
/** Encryption engine used. */
engine = 'pgp';
/** Encryption algorithm used */
algo = 'sha256';
/** Message digest */
dgst: string;
/** Generated signature */
signature: Signature;
/** A keystore holding pgp keys. */
keyStore: MutableKeyStore;
/** Event triggered on successful signing of message. */
onsign: (signature: Signature) => void;
/** Event triggered on successful verification of a signature. */
onverify: (flag: boolean) => void;
/** A service that provides logging capabilities. */
loggingService: LoggingService;
/**
* Initializing the Signer.
* @param keyStore - A keystore holding pgp keys.
*/
constructor(keyStore: MutableKeyStore) {
this.keyStore = keyStore;
this.onsign = (signature: Signature) => {};
this.onverify = (flag: boolean) => {};
}
/**
* Get the private key fingerprint.
* @returns A private key fingerprint.
*/
public fingerprint(): string {
return this.keyStore.getFingerprint();
}
/**
* Load the message digest.
* @param material - A signable object.
* @returns true - If digest has been loaded successfully.
*/
public prepare(material: Signable): boolean {
this.dgst = material.digest();
return true;
}
/**
* Verify that signature is valid.
* @param digest - The message that was signed.
* @param signature - The generated signature.
*/
public verify(digest: string, signature: Signature): void {
openpgp.signature
.readArmored(signature.data)
@ -80,6 +138,11 @@ class PGPSigner implements Signer {
});
}
/**
* Signs a message using a private key.
* @async
* @param digest - The message to be signed.
*/
public async sign(digest: string): Promise<void> {
const m = openpgp.cleartext.fromText(digest);
const pk = this.keyStore.getPrivateKey();
@ -111,4 +174,5 @@ class PGPSigner implements Signer {
}
}
/** @exports */
export { Signable, Signature, Signer, PGPSigner };