code refactoring and added extensive documentation
This commit is contained in:
217
LICENSE
Normal file
217
LICENSE
Normal file
@@ -0,0 +1,217 @@
|
||||
Copyright 2020 Dennis Gunia
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
docs/assets/css/main.css
Normal file
1
docs/assets/css/main.css
Normal file
File diff suppressed because one or more lines are too long
BIN
docs/assets/images/icons.png
Normal file
BIN
docs/assets/images/icons.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
BIN
docs/assets/images/icons@2x.png
Normal file
BIN
docs/assets/images/icons@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
docs/assets/images/widgets.png
Normal file
BIN
docs/assets/images/widgets.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 480 B |
BIN
docs/assets/images/widgets@2x.png
Normal file
BIN
docs/assets/images/widgets@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 855 B |
51
docs/assets/js/main.js
Normal file
51
docs/assets/js/main.js
Normal file
File diff suppressed because one or more lines are too long
1
docs/assets/js/search.json
Normal file
1
docs/assets/js/search.json
Normal file
File diff suppressed because one or more lines are too long
697
docs/classes/svault.securevault.html
Normal file
697
docs/classes/svault.securevault.html
Normal file
@@ -0,0 +1,697 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>SecureVault | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="svault.securevault.html">SecureVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Class SecureVault</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Class representing a SecureVault.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">SecureVault</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Constructors</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-constructor tsd-parent-kind-class"><a href="svault.securevault.html#constructor" class="tsd-kind-icon">constructor</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Properties</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-property tsd-parent-kind-class"><a href="svault.securevault.html#privpath" class="tsd-kind-icon">priv<wbr>Path</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-class"><a href="svault.securevault.html#pubpath" class="tsd-kind-icon">pub<wbr>Path</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-class"><a href="svault.securevault.html#safe" class="tsd-kind-icon">safe</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-class"><a href="svault.securevault.html#storage" class="tsd-kind-icon">storage</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Methods</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#clearvault" class="tsd-kind-icon">clear<wbr>Vault</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#decryptdata" class="tsd-kind-icon">decrypt<wbr>Data</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#findstorage" class="tsd-kind-icon">find<wbr>Storage</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#getstorage" class="tsd-kind-icon">get<wbr>Storage</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#loaddata" class="tsd-kind-icon">load<wbr>Data</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#pushdata" class="tsd-kind-icon">push<wbr>Data</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#pushstorage" class="tsd-kind-icon">push<wbr>Storage</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#savedata" class="tsd-kind-icon">save<wbr>Data</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#setstorage" class="tsd-kind-icon">set<wbr>Storage</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><a href="svault.securevault.html#writetransaction" class="tsd-kind-icon">write<wbr>Transaction</a></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="svault.securevault.html#genkey" class="tsd-kind-icon">gen<wbr>Key</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Constructors</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class">
|
||||
<a name="constructor" class="tsd-anchor"></a>
|
||||
<h3>constructor</h3>
|
||||
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">new <wbr>Secure<wbr>Vault<span class="tsd-signature-symbol">(</span>publicKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span>, privateKey<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="svault.securevault.html" class="tsd-signature-type">SecureVault</a></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:76</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Create a SecureVault.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> publicKey: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Path to public key.</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> privateKey: <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Path to private key.</p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <a href="svault.securevault.html" class="tsd-signature-type">SecureVault</a></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
||||
<a name="privpath" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> priv<wbr>Path</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">priv<wbr>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:72</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Path to private key</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
||||
<a name="pubpath" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> pub<wbr>Path</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">pub<wbr>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:74</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Path to public key</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
||||
<a name="safe" class="tsd-anchor"></a>
|
||||
<h3>safe</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">safe<span class="tsd-signature-symbol">:</span> <a href="../interfaces/svault.securevaultlist.html" class="tsd-signature-type">secureVaultList</a></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:70</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Safe object</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
|
||||
<a name="storage" class="tsd-anchor"></a>
|
||||
<h3>storage</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">storage<span class="tsd-signature-symbol">:</span> <a href="../interfaces/svault.storageitem.html" class="tsd-signature-type">StorageItem</a><span class="tsd-signature-symbol">[]</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:76</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Array of unencrypted items</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Methods</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="clearvault" class="tsd-anchor"></a>
|
||||
<h3>clear<wbr>Vault</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">clear<wbr>Vault<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:281</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Clears all encrypted items from safe.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="decryptdata" class="tsd-anchor"></a>
|
||||
<h3>decrypt<wbr>Data</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">decrypt<wbr>Data<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:175</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Decrypts safe data.
|
||||
Requires specified and loaded private key.
|
||||
Prints data to console.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
||||
<p>Resolves promise after decrypted</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="findstorage" class="tsd-anchor"></a>
|
||||
<h3>find<wbr>Storage</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">find<wbr>Storage<span class="tsd-signature-symbol">(</span>tag<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/svault.storageitem.html" class="tsd-signature-type">StorageItem</a><span class="tsd-signature-symbol">[]</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:270</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Gets list of UUIDs matching the tag.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>tag: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>tag to search for</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <a href="../interfaces/svault.storageitem.html" class="tsd-signature-type">StorageItem</a><span class="tsd-signature-symbol">[]</span></h4>
|
||||
<p>UUID from item.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="getstorage" class="tsd-anchor"></a>
|
||||
<h3>get<wbr>Storage</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">get<wbr>Storage<span class="tsd-signature-symbol">(</span>suuid<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:255</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Gets unencrypted data of item specified by suuid.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>suuid: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>UUID for item</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
|
||||
<p>Data from item.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="loaddata" class="tsd-anchor"></a>
|
||||
<h3>load<wbr>Data</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">load<wbr>Data<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:153</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Loads safe from file and check compatibility</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>path: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Path to safefile.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
||||
<p>Resolves promise after loaded</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="pushdata" class="tsd-anchor"></a>
|
||||
<h3>push<wbr>Data</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">push<wbr>Data<span class="tsd-signature-symbol">(</span>data<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"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:100</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Encrypts and appends data to SecureVault.
|
||||
Also writes data to transaction log using @function writeTransaction</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>data: <span class="tsd-signature-type">any</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Path to public key.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">></span></h4>
|
||||
<p>Returns the uuid of the added object as promise</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="pushstorage" class="tsd-anchor"></a>
|
||||
<h3>push<wbr>Storage</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">push<wbr>Storage<span class="tsd-signature-symbol">(</span>tag<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:221</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Appends unencrypted data to safe.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>tag: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Tag for item</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>data: <span class="tsd-signature-type">any</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Data to store.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="savedata" class="tsd-anchor"></a>
|
||||
<h3>save<wbr>Data</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">save<wbr>Data<span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:140</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Saves safe to file</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>path: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Path to safefile.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
||||
<p>Resolves promise after loaded</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="setstorage" class="tsd-anchor"></a>
|
||||
<h3>set<wbr>Storage</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">set<wbr>Storage<span class="tsd-signature-symbol">(</span>suuid<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, data<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:240</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Sets unencrypted data for item specified by suuid.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>suuid: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>UUID for item</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>data: <span class="tsd-signature-type">any</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Data to store.</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
|
||||
<a name="writetransaction" class="tsd-anchor"></a>
|
||||
<h3>write<wbr>Transaction</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
|
||||
<li class="tsd-signature tsd-kind-icon">write<wbr>Transaction<span class="tsd-signature-symbol">(</span>payload<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:131</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Writes data to the vault log file located at ./vault.log</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>payload: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Text to append</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-static">
|
||||
<a name="genkey" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagStatic">Static</span> gen<wbr>Key</h3>
|
||||
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-static">
|
||||
<li class="tsd-signature tsd-kind-icon">gen<wbr>Key<span class="tsd-signature-symbol">(</span>publicKeyDir<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, privateKeyDir<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:199</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Generates RSA keypair.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>publicKeyDir: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
<li>
|
||||
<h5>privateKeyDir: <span class="tsd-signature-type">string</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class="current tsd-kind-namespace">
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-class tsd-parent-kind-namespace">
|
||||
<a href="svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-constructor tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#constructor" class="tsd-kind-icon">constructor</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#privpath" class="tsd-kind-icon">priv<wbr>Path</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#pubpath" class="tsd-kind-icon">pub<wbr>Path</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#safe" class="tsd-kind-icon">safe</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#storage" class="tsd-kind-icon">storage</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#clearvault" class="tsd-kind-icon">clear<wbr>Vault</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#decryptdata" class="tsd-kind-icon">decrypt<wbr>Data</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#findstorage" class="tsd-kind-icon">find<wbr>Storage</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#getstorage" class="tsd-kind-icon">get<wbr>Storage</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#loaddata" class="tsd-kind-icon">load<wbr>Data</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#pushdata" class="tsd-kind-icon">push<wbr>Data</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#pushstorage" class="tsd-kind-icon">push<wbr>Storage</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#savedata" class="tsd-kind-icon">save<wbr>Data</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#setstorage" class="tsd-kind-icon">set<wbr>Storage</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class">
|
||||
<a href="svault.securevault.html#writetransaction" class="tsd-kind-icon">write<wbr>Transaction</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
|
||||
<a href="svault.securevault.html#genkey" class="tsd-kind-icon">gen<wbr>Key</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="../modules/svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
|
||||
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
380
docs/globals.html
Normal file
380
docs/globals.html
Normal file
@@ -0,0 +1,380 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="globals.html">Globals</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>opentoken</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Namespaces</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-namespace"><a href="modules/mlgenerator.html" class="tsd-kind-icon">MLGenerator</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/mlparser.html" class="tsd-kind-icon">MLParser</a></li>
|
||||
<li class="tsd-kind-namespace"><a href="modules/svault.html" class="tsd-kind-icon">SVault</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Interfaces</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-interface"><a href="interfaces/otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Variables</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-variable"><a href="globals.html#action" class="tsd-kind-icon">action</a></li>
|
||||
<li class="tsd-kind-variable"><a href="globals.html#configpath" class="tsd-kind-icon">config<wbr>Path</a></li>
|
||||
<li class="tsd-kind-variable"><a href="globals.html#dryrun" class="tsd-kind-icon">dryrun</a></li>
|
||||
<li class="tsd-kind-variable"><a href="globals.html#force" class="tsd-kind-icon">force</a></li>
|
||||
<li class="tsd-kind-variable"><a href="globals.html#html" class="tsd-kind-icon">html</a></li>
|
||||
<li class="tsd-kind-variable"><a href="globals.html#mails" class="tsd-kind-icon">mails</a></li>
|
||||
<li class="tsd-kind-variable"><a href="globals.html#privkey" class="tsd-kind-icon">priv<wbr>Key</a></li>
|
||||
<li class="tsd-kind-variable"><a href="globals.html#pubkey" class="tsd-kind-icon">pub<wbr>Key</a></li>
|
||||
<li class="tsd-kind-variable"><a href="globals.html#safefile" class="tsd-kind-icon">safe<wbr>File</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Functions</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-function"><a href="globals.html#delay" class="tsd-kind-icon">delay</a></li>
|
||||
<li class="tsd-kind-function"><a href="globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a></li>
|
||||
<li class="tsd-kind-function"><a href="globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Variables</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable">
|
||||
<a name="action" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagLet">Let</span> action</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">action<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = -1</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in index.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable">
|
||||
<a name="configpath" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagLet">Let</span> config<wbr>Path</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">config<wbr>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ""</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in index.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable">
|
||||
<a name="dryrun" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagLet">Let</span> dryrun</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">dryrun<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in index.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable">
|
||||
<a name="force" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagLet">Let</span> force</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">force<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in index.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable">
|
||||
<a name="html" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagLet">Let</span> html</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">html<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ""</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in index.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable">
|
||||
<a name="mails" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagLet">Let</span> mails</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">mails<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ""</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in index.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable">
|
||||
<a name="privkey" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagLet">Let</span> priv<wbr>Key</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">priv<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ""</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in index.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable">
|
||||
<a name="pubkey" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagLet">Let</span> pub<wbr>Key</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">pub<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ""</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in index.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable">
|
||||
<a name="safefile" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagLet">Let</span> safe<wbr>File</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">safe<wbr>File<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = ""</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in index.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Functions</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-function">
|
||||
<a name="delay" class="tsd-anchor"></a>
|
||||
<h3>delay</h3>
|
||||
<ul class="tsd-signatures tsd-kind-function">
|
||||
<li class="tsd-signature tsd-kind-icon">delay<span class="tsd-signature-symbol">(</span>t<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/util/misc.ts:44</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Wraps setTimeout into Promise</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>t: <span class="tsd-signature-type">number</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Millisceonds</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol">></span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-function">
|
||||
<a name="mkstringcn" class="tsd-anchor"></a>
|
||||
<h3>mkstringCN</h3>
|
||||
<ul class="tsd-signatures tsd-kind-function">
|
||||
<li class="tsd-signature tsd-kind-icon">mkstringCN<span class="tsd-signature-symbol">(</span>length<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/util/misc.ts:30</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Generate random string with specified length.
|
||||
Generates only numbers and capital letters.</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>length: <span class="tsd-signature-type">number</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>length of String</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4>
|
||||
<p>generated string</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-function">
|
||||
<a name="shufflearray" class="tsd-anchor"></a>
|
||||
<h3>shuffle<wbr>Array</h3>
|
||||
<ul class="tsd-signatures tsd-kind-function">
|
||||
<li class="tsd-signature tsd-kind-icon">shuffle<wbr>Array<span class="tsd-signature-symbol">(</span>array<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-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/util/shuffle.ts:5</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Randomize items in an array</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>array: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Array to be shuffeled</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals current ">
|
||||
<a href="globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="modules/mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="modules/mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="modules/svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-interface">
|
||||
<a href="interfaces/otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#action" class="tsd-kind-icon">action</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#configpath" class="tsd-kind-icon">config<wbr>Path</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#dryrun" class="tsd-kind-icon">dryrun</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#force" class="tsd-kind-icon">force</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#html" class="tsd-kind-icon">html</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#mails" class="tsd-kind-icon">mails</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#privkey" class="tsd-kind-icon">priv<wbr>Key</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#pubkey" class="tsd-kind-icon">pub<wbr>Key</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#safefile" class="tsd-kind-icon">safe<wbr>File</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="globals.html#delay" class="tsd-kind-icon">delay</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
316
docs/index.html
Normal file
316
docs/index.html
Normal file
@@ -0,0 +1,316 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="assets/js/search.json" data-base=".">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="globals.html">Globals</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>opentoken</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<div class="tsd-panel tsd-typography">
|
||||
<a href="#one-time-codejs" id="one-time-codejs" style="color: inherit; text-decoration: none;">
|
||||
<h1>one-time-code.js</h1>
|
||||
</a>
|
||||
<p>Dies ist ein Programm zum erzeugen von anonymen Schlüsseln. Diese werden automatisch den Teilnehmern zugesendet.
|
||||
Zudem wird ein asymetrisch verschlüsselter Safe erstellt.</p>
|
||||
<a href="#zweck" id="zweck" style="color: inherit; text-decoration: none;">
|
||||
<h2>Zweck</h2>
|
||||
</a>
|
||||
<p>Für ananoyme Wahlen muss sichergestellt werden, dass:</p>
|
||||
<ol>
|
||||
<li>Nur berechtigter Personen abstimmen können</li>
|
||||
<li>Jeder Wähler nicht rückverfolgbar ist</li>
|
||||
<li>Jeder Wähler nur einmal abstimmen kann</li>
|
||||
</ol>
|
||||
<p>Punkte 1. und 2. Lassen sich mit dieser Anwendug realisieren.</p>
|
||||
<a href="#funktionsprinzip" id="funktionsprinzip" style="color: inherit; text-decoration: none;">
|
||||
<h2>Funktionsprinzip</h2>
|
||||
</a>
|
||||
<p>Diese Anwendung muss auf zwei Systemen installiert sein. Beide Systeme dürfen nicht aufeinander Zugreifen können und müssen von verschiedenen Personen bedient werden.
|
||||
Die beiden Systeme sind:</p>
|
||||
<ul>
|
||||
<li>System A & Person A: Hier werden die Schlüssel erzeugt, benutzern zufällig zugewiesen und versendet. </li>
|
||||
<li>System B & Person B: Hier wird das Schlüsselpaar erzeugt und hier kann der Safe entschlüsselt werden.</li>
|
||||
<li>Person C: Erhält von Person A die gültigen Codes und verifiziert die eingehenden Wahlzettel.</li>
|
||||
</ul>
|
||||
<p>Da Person A die SChlüssel-Nutzer Zuordnung zu keinem Zeitpunkt kennt, kann sie auch die selbe Person wie Person C sein.</p>
|
||||
<a href="#schritt-1" id="schritt-1" style="color: inherit; text-decoration: none;">
|
||||
<h3>Schritt 1</h3>
|
||||
</a>
|
||||
<p>Auf System B wird ein Schlüsselpaar erzeugt. Dies besteht aus dem Öffentlichen und Privaten schlüssel.</p>
|
||||
<ul>
|
||||
<li>Der Öffentliche schlüssel dient zur Verschlüsselung der Daten und kann nicht zum entschlüsseln verwendet werden.</li>
|
||||
<li>Der Private schlüssel dient zur entschlüsselung des Safes und darf System B NIEMALS verlassen.</li>
|
||||
</ul>
|
||||
<p>Dazu wird z.B. folgender Befehl ausgeführt:
|
||||
`ts-node .\index.ts --privkey private.key --pubkey public.key --genkey</p>
|
||||
<p>Der erzeugte Öffentliche schlüssel muss an Person A übergeben werden. Diese nutzt den Schlüssel auf System A zum verschlüsseln des Passwortsafes.</p>
|
||||
<a href="#schritt-2" id="schritt-2" style="color: inherit; text-decoration: none;">
|
||||
<h3>Schritt 2</h3>
|
||||
</a>
|
||||
<p>Auf System A werden jetzt die Codes erzeugt und an die Nutzer versendet.
|
||||
Die Nutzer-Schlüssel zuweisung erfolgt temporär auf System A, ist jedoch nicht auslesbar und wird unmittelbar im Passwortsafe gespeichert.</p>
|
||||
<p>Person A führt folgenden Befehl aus:
|
||||
`ts-node .\index.ts --config config.json --pubkey public.key --send --safe .\out\credentials.json --mails mail.txt -html template.html</p>
|
||||
<p>Dabei wird eine Liste mit den Mails und Namen sowie der schlüssel übergeben.</p>
|
||||
<p>Der Ausfbau der mail.txt ist:</p>
|
||||
<pre><code><span class="hljs-tag"><<span class="hljs-name">mail</span>></span>;<span class="hljs-tag"><<span class="hljs-name">name</span>></span>
|
||||
<span class="hljs-tag"><<span class="hljs-name">mail</span>></span>;<span class="hljs-tag"><<span class="hljs-name">name</span>></span>
|
||||
...</code></pre>
|
||||
<p>Es werden drei Ausgaben erzeugt:</p>
|
||||
<ul>
|
||||
<li>Eine RegEx vorlage für alle Codes</li>
|
||||
<li>Safe-Datei</li>
|
||||
</ul>
|
||||
<p>Die Speicherorte der Code-Files werden in der config.json angegeben.
|
||||
Der Safe wird an Person B weitergegeben. </p>
|
||||
<p>Das Programm versendet automatisch Mails an alle Personen. Die HTML Vorlage wird mit --html angegeben.
|
||||
In der Vorlage werden folgende Zeichenketten ersetzt:
|
||||
<code>{{code}} => Genereirter Code </code>{{name}}
|
||||
=> Name
|
||||
`{{mail}}
|
||||
=> Mail</p>
|
||||
<p>Der SMTP-Relay-Server wird in der config.json angegeben.
|
||||
Geenaue Doku: <a href="https://nodemailer.com/smtp/">https://nodemailer.com/smtp/</a></p>
|
||||
<a href="#schritt-3" id="schritt-3" style="color: inherit; text-decoration: none;">
|
||||
<h3>Schritt 3</h3>
|
||||
</a>
|
||||
<p>Ggf. muss der Safe entschlüsselt werden. Beispielfälle wären: </p>
|
||||
<ul>
|
||||
<li>Teilnehmer hat keinen Zugriff auf das Mailkonto</li>
|
||||
<li>Teilnehmer hat seinen Code vergessen</li>
|
||||
<li>Mail wurd durch den Spamfilter entfernt</li>
|
||||
</ul>
|
||||
<p>Person B muss dann mit dem Privaten Schlüssel den Safe auslesen und dem Teilnehmer seinen Code zukommen lassen.
|
||||
Dazu muss golgender Befehl ausgeführt werden:
|
||||
ts-node .\index.ts --privkey private.key --decrypt --safe .\out\credentials.json</p>
|
||||
<a href="#config-datei" id="config-datei" style="color: inherit; text-decoration: none;">
|
||||
<h2>Config-Datei</h2>
|
||||
</a>
|
||||
<pre><code>{
|
||||
<span class="hljs-attr">"mail"</span>:{
|
||||
<span class="hljs-attr">"host"</span>: <span class="hljs-string">"<mailserver>"</span>,
|
||||
<span class="hljs-attr">"port"</span>: <mailport>,
|
||||
<span class="hljs-attr">"secure"</span>: <use ssl>,
|
||||
<span class="hljs-attr">"auth"</span>: {
|
||||
<span class="hljs-attr">"user"</span>: <span class="hljs-string">"<mail-user>"</span>,
|
||||
<span class="hljs-attr">"pass"</span>: <span class="hljs-string">"<mail-password>"</span>
|
||||
},
|
||||
<span class="hljs-attr">"tls"</span>: {
|
||||
<span class="hljs-attr">"rejectUnauthorized"</span>: <span class="hljs-literal">false</span>,
|
||||
<span class="hljs-attr">"ciphers"</span>:<span class="hljs-string">"SSLv3"</span>
|
||||
}
|
||||
},
|
||||
<span class="hljs-attr">"mailFrom"</span>: <span class="hljs-string">"<absender name>"</span>,
|
||||
<span class="hljs-attr">"outFileMatch"</span>: <span class="hljs-string">"<ausgabedatei regex>"</span>
|
||||
}</code></pre>
|
||||
<a href="#syntax" id="syntax" style="color: inherit; text-decoration: none;">
|
||||
<h2>Syntax</h2>
|
||||
</a>
|
||||
<p>==> Schlüsselpaar Erzeugen
|
||||
<code>ts-node .\index.ts --privkey <path-to-private-key> --pubkey <path-to-public-key> --genkey</code></p>
|
||||
<p>z.B. <code>ts-node .\index.ts --privkey private.key --pubkey public.key --genkey</code></p>
|
||||
<p>==> Codes Erzeugen und versenden
|
||||
<code>ts-node .\index.ts --config <path-to-config-key> --pubkey <path-to-public-key> --send --safe credentials.json --mails <path-to-mail-list> -html <path-to-html-template></code></p>
|
||||
<p>Achtung: Es wird im Safe geprüft, ob Mailadressen bereits "bedient" wurden. Sollte dies der Fall sein, werden keine Mails an diese Adresse gesendet. Dies lässt sich mit dem Schalter <code>--force</code> umgehen.</p>
|
||||
<p>z.B. <code>ts-node .\index.ts --config config.json --pubkey public.key --send --safe credentials.json --mails mail.txt -html template.html</code></p>
|
||||
<p>==> Safe entschlüsseln
|
||||
<code>ts-node .\index.ts --privkey <path-to-private-key> --decrypt --safe credentials.json</code></p>
|
||||
<p>z.B. <code>ts-node .\index.ts --privkey private.key --decrypt --safe credentials.json</code></p>
|
||||
<a href="#erweiterte-schalter" id="erweiterte-schalter" style="color: inherit; text-decoration: none;">
|
||||
<h3>Erweiterte Schalter</h3>
|
||||
</a>
|
||||
<ul>
|
||||
<li><code>--dryrun</code> : Mails werden nicht versendet und der Safe wird nicht verändert.</li>
|
||||
<li><code>--force</code> : Alle Codes werden neu generiert und alle mails werden gesendet. Ignoriere bereits gesendete mails.</li>
|
||||
</ul>
|
||||
<a href="#gepackte-binaries" id="gepackte-binaries" style="color: inherit; text-decoration: none;">
|
||||
<h2>Gepackte Binaries</h2>
|
||||
</a>
|
||||
<p>Die gepackten Binaries sind für Linux, MacOS und Windoof verfügbar: <a href="https://gitlab.dennisgunia.de/dennisgunia/one-time-code-js/-/tree/master/bin">Binaries</a></p>
|
||||
<p>Die befehle ändern sich wie folgt:</p>
|
||||
<p>==> Schlüsselpaar Erzeuge
|
||||
<code>./opentoken --privkey <path-to-private-key> --pubkey <path-to-public-key> --genkey</code></p>
|
||||
<p>z.B. <code>./opentoken --privkey private.key --pubkey public.key --genkey</code></p>
|
||||
<p>==> Codes Erzeugen und versenden
|
||||
<code>./opentoken --config <path-to-config-key> --pubkey <path-to-public-key> --send --safe .\out\credentials.json --mails <path-to-mail-list> -html <path-to-html-template></code></p>
|
||||
<p>z.B. <code>./opentoken --config config.json --pubkey public.key --send --safe .\out\credentials.json --mails mail.txt -html template.html</code></p>
|
||||
<p>==> Safe entschlüsseln
|
||||
<code>./opentoken --privkey <path-to-private-key> --decrypt --safe .\out\credentials.json</code></p>
|
||||
<p>z.B. <code>./opentoken --privkey private.key --decrypt --safe .\out\credentials.json</code></p>
|
||||
<a href="#ausführen-des-quellcodes" id="ausführen-des-quellcodes" style="color: inherit; text-decoration: none;">
|
||||
<h2>Ausführen des Quellcodes</h2>
|
||||
</a>
|
||||
<p>Der Sourcecode kann auch über ts-node ausgeführt werden.
|
||||
Dazu ist Node.js Version 12 zu verwenden</p>
|
||||
<p><code>nvm use 12</code></p>
|
||||
<p>Zum Ausführen sind folgende npm Pakete notwendig:</p>
|
||||
<ul>
|
||||
<li>typescript</li>
|
||||
<li>tslint</li>
|
||||
<li>ts-node</li>
|
||||
</ul>
|
||||
<p>Installerien sie diese mit:
|
||||
<code>npm install -g typescript tslint ts-node</code></p>
|
||||
<p>Clonen sie dieses Repository auf ihren lokalen rechner und wechseln sie anschließend in dessen verzeichniss:</p>
|
||||
<p><code>git clone https://gitlab.dennisgunia.de/dennisgunia/one-time-code-js.git</code></p>
|
||||
<p><code>cd one-time-code-js</code></p>
|
||||
<p>Installieren sie alle lokalen npm Pakete</p>
|
||||
<p><code>npm install</code></p>
|
||||
<p>Kopieren Sie die Config-Template und passen Sie die SMTP-Zugangsdaten an:</p>
|
||||
<p><code>cp config.template.json config.json</code></p>
|
||||
<p><code>vim config.json</code></p>
|
||||
<p>Das Skript kann nun über <code>npm run-script exec</code> oder <code>ts-node index.js</code> ausgeführt werden.</p>
|
||||
<a href="#packen-des-quellcodes" id="packen-des-quellcodes" style="color: inherit; text-decoration: none;">
|
||||
<h2>Packen des Quellcodes</h2>
|
||||
</a>
|
||||
<p>Zum Packen des Quellcodes ist das npm-Paket <code>pkg</code> zu installieren:</p>
|
||||
<p><code>npm install -g pkg</code></p>
|
||||
<p>Anschließend wird der Code in JS transpiliert und durch pkg gepackt:</p>
|
||||
<p><code>npm run-script build</code></p>
|
||||
<p>Die Binaries werden in <code>./bin</code> gespeichert. Diese sind auch auf Systemen ohne node.js ausführbar.</p>
|
||||
<a href="#was-landet-im-safe" id="was-landet-im-safe" style="color: inherit; text-decoration: none;">
|
||||
<h2>Was landet im Safe?</h2>
|
||||
</a>
|
||||
<p>Im safe landen die verschlüsselten Zuordnungen zwischen Codes und Mailadressen.</p>
|
||||
<p>Zudem werden die verwendeten Codes und die bereits gesendeten Mailadressen seperat voneinander und zufällig gemischt in Klartext gespeichert.</p>
|
||||
<p>Dies ermöglicht es, nachträglich benutzer hinzuzufügen, ohne allen anderen neue Mails oder gar neue Codes zukommen lassen zu müssen.</p>
|
||||
<p>Es ist jedoch nocht empfohlen, nachträglich mails hinzuzufügen, da dies, abhängig von der Menge der gleichzeitig hinzugefügten Adressen eine grobe oder ggf. auch sehr genaue zuordnung zwischen Code und Mail der Nachzügler möglich ist. </p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="modules/mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="modules/mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="modules/svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-interface">
|
||||
<a href="interfaces/otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#action" class="tsd-kind-icon">action</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#configpath" class="tsd-kind-icon">config<wbr>Path</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#dryrun" class="tsd-kind-icon">dryrun</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#force" class="tsd-kind-icon">force</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#html" class="tsd-kind-icon">html</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#mails" class="tsd-kind-icon">mails</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#privkey" class="tsd-kind-icon">priv<wbr>Key</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#pubkey" class="tsd-kind-icon">pub<wbr>Key</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="globals.html#safefile" class="tsd-kind-icon">safe<wbr>File</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="globals.html#delay" class="tsd-kind-icon">delay</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
202
docs/interfaces/mlgenerator.mlgenreturn.html
Normal file
202
docs/interfaces/mlgenerator.mlgenreturn.html
Normal file
@@ -0,0 +1,202 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>MLGenReturn | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../modules/mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="mlgenerator.mlgenreturn.html">MLGenReturn</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Interface MLGenReturn</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Interface used to Return codes and mails form the main Function <a href="../modules/mlgenerator.html#generatetoken">generateToken</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">MLGenReturn</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Properties</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="mlgenerator.mlgenreturn.html#codes" class="tsd-kind-icon">codes</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="mlgenerator.mlgenreturn.html#mails" class="tsd-kind-icon">mails</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="codes" class="tsd-anchor"></a>
|
||||
<h3>codes</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">codes<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/generate.ts:45</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>List of generated codes</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="mails" class="tsd-anchor"></a>
|
||||
<h3>mails</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">mails<span class="tsd-signature-symbol">:</span> <a href="mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/generate.ts:47</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>List of processed mails</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class="current tsd-kind-namespace">
|
||||
<a href="../modules/mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="mlgenerator.mlgenreturn.html" class="tsd-kind-icon">MLGen<wbr>Return</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="mlgenerator.mlgenreturn.html#codes" class="tsd-kind-icon">codes</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="mlgenerator.mlgenreturn.html#mails" class="tsd-kind-icon">mails</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="../modules/mlgenerator.html#generatecodes" class="tsd-kind-icon">generate<wbr>Codes</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace">
|
||||
<a href="../modules/mlgenerator.html#generatetoken" class="tsd-kind-icon">generate<wbr>Token</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="../modules/mlgenerator.html#send" class="tsd-kind-icon">send</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="../modules/mlgenerator.html#sendmails" class="tsd-kind-icon">send<wbr>Mails</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
193
docs/interfaces/mlparser.mlitem.html
Normal file
193
docs/interfaces/mlparser.mlitem.html
Normal file
@@ -0,0 +1,193 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>MLItem | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../modules/mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="mlparser.mlitem.html">MLItem</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Interface MLItem</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Interface containing properties of a single mail line</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">MLItem</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Properties</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="mlparser.mlitem.html#mail" class="tsd-kind-icon">mail</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="mlparser.mlitem.html#name" class="tsd-kind-icon">name</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="mail" class="tsd-anchor"></a>
|
||||
<h3>mail</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">mail<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/mailParser.ts:37</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>mail adress parsed form file</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="name" class="tsd-anchor"></a>
|
||||
<h3>name</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">name<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/mailParser.ts:39</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>name parsed form file</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class="current tsd-kind-namespace">
|
||||
<a href="../modules/mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="mlparser.mlitem.html" class="tsd-kind-icon">MLItem</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="mlparser.mlitem.html#mail" class="tsd-kind-icon">mail</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="mlparser.mlitem.html#name" class="tsd-kind-icon">name</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace">
|
||||
<a href="../modules/mlparser.html#parsemails" class="tsd-kind-icon">parse<wbr>Mails</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
347
docs/interfaces/otglobalconfig.html
Normal file
347
docs/interfaces/otglobalconfig.html
Normal file
@@ -0,0 +1,347 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>OTGlobalConfig | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="otglobalconfig.html">OTGlobalConfig</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Interface OTGlobalConfig</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Interface containing all config properties for opentoken</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">OTGlobalConfig</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Properties</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#dryrun" class="tsd-kind-icon">dryrun</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#force" class="tsd-kind-icon">force</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#htmlpath" class="tsd-kind-icon">html<wbr>Path</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#infilemail" class="tsd-kind-icon">in<wbr>File<wbr>Mail</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#mail" class="tsd-kind-icon">mail</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#mailfrom" class="tsd-kind-icon">mail<wbr>From</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#outfilematch" class="tsd-kind-icon">out<wbr>File<wbr>Match</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#usedmails" class="tsd-kind-icon">used<wbr>Mails</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="otglobalconfig.html#usedtokens" class="tsd-kind-icon">used<wbr>Tokens</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="dryrun" class="tsd-anchor"></a>
|
||||
<h3>dryrun</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">dryrun<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/config.type.ts:25</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>switch for dryrun</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="force" class="tsd-anchor"></a>
|
||||
<h3>force</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">force<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/config.type.ts:27</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>switch for force</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="htmlpath" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> html<wbr>Path</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">html<wbr>Path<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/config.type.ts:16</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>path to file containing mail template</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="infilemail" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> in<wbr>File<wbr>Mail</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">in<wbr>File<wbr>Mail<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/config.type.ts:14</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>path to file containing mails</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="mail" class="tsd-anchor"></a>
|
||||
<h3>mail</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">mail<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">SMTPTransport</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/config.type.ts:8</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>nodemailer SMTP configuration</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="mailfrom" class="tsd-anchor"></a>
|
||||
<h3>mail<wbr>From</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">mail<wbr>From<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/config.type.ts:10</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>sender alias</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="outfilematch" class="tsd-anchor"></a>
|
||||
<h3>out<wbr>File<wbr>Match</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">out<wbr>File<wbr>Match<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/config.type.ts:12</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>path to file containing matches</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="usedmails" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> used<wbr>Mails</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">used<wbr>Mails<span class="tsd-signature-symbol">:</span> <a href="mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/config.type.ts:21</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>List of used mail adresses</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="usedtokens" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> used<wbr>Tokens</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">used<wbr>Tokens<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/config.type.ts:19</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>List of used tokens</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-interface">
|
||||
<a href="otglobalconfig.html" class="tsd-kind-icon">OTGlobal<wbr>Config</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="otglobalconfig.html#dryrun" class="tsd-kind-icon">dryrun</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="otglobalconfig.html#force" class="tsd-kind-icon">force</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="otglobalconfig.html#htmlpath" class="tsd-kind-icon">html<wbr>Path</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="otglobalconfig.html#infilemail" class="tsd-kind-icon">in<wbr>File<wbr>Mail</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="otglobalconfig.html#mail" class="tsd-kind-icon">mail</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="otglobalconfig.html#mailfrom" class="tsd-kind-icon">mail<wbr>From</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="otglobalconfig.html#outfilematch" class="tsd-kind-icon">out<wbr>File<wbr>Match</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="otglobalconfig.html#usedmails" class="tsd-kind-icon">used<wbr>Mails</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="otglobalconfig.html#usedtokens" class="tsd-kind-icon">used<wbr>Tokens</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="../globals.html#action" class="tsd-kind-icon">action</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="../globals.html#configpath" class="tsd-kind-icon">config<wbr>Path</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="../globals.html#dryrun" class="tsd-kind-icon">dryrun</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="../globals.html#force" class="tsd-kind-icon">force</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="../globals.html#html" class="tsd-kind-icon">html</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="../globals.html#mails" class="tsd-kind-icon">mails</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="../globals.html#privkey" class="tsd-kind-icon">priv<wbr>Key</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="../globals.html#pubkey" class="tsd-kind-icon">pub<wbr>Key</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable">
|
||||
<a href="../globals.html#safefile" class="tsd-kind-icon">safe<wbr>File</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="../globals.html#delay" class="tsd-kind-icon">delay</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="../globals.html#mkstringcn" class="tsd-kind-icon">mkstringCN</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function">
|
||||
<a href="../globals.html#shufflearray" class="tsd-kind-icon">shuffle<wbr>Array</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
240
docs/interfaces/svault.securevaultitem.html
Normal file
240
docs/interfaces/svault.securevaultitem.html
Normal file
@@ -0,0 +1,240 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>SecureVaultItem | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="svault.securevaultitem.html">SecureVaultItem</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Interface SecureVaultItem</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Interface for an vault item containing encrypted data</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">SecureVaultItem</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Properties</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultitem.html#d" class="tsd-kind-icon">d</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultitem.html#iv" class="tsd-kind-icon">iv</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultitem.html#k" class="tsd-kind-icon">k</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultitem.html#u" class="tsd-kind-icon">u</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="d" class="tsd-anchor"></a>
|
||||
<h3>d</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">d<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:43</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>data</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="iv" class="tsd-anchor"></a>
|
||||
<h3>iv</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">iv<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:47</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>init vector</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="k" class="tsd-anchor"></a>
|
||||
<h3>k</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">k<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:45</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>key</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="u" class="tsd-anchor"></a>
|
||||
<h3>u</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">u<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:41</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>uuid</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class="current tsd-kind-namespace">
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-class tsd-parent-kind-namespace">
|
||||
<a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.securevaultitem.html#d" class="tsd-kind-icon">d</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.securevaultitem.html#iv" class="tsd-kind-icon">iv</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.securevaultitem.html#k" class="tsd-kind-icon">k</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.securevaultitem.html#u" class="tsd-kind-icon">u</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="../modules/svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
206
docs/interfaces/svault.securevaultlist.html
Normal file
206
docs/interfaces/svault.securevaultlist.html
Normal file
@@ -0,0 +1,206 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>secureVaultList | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="svault.securevaultlist.html">secureVaultList</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Interface secureVaultList</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Interface for secureVault Array</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">secureVaultList</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Properties</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultlist.html#items" class="tsd-kind-icon">items</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultlist.html#privatekey" class="tsd-kind-icon">private<wbr>Key</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.securevaultlist.html#publickey" class="tsd-kind-icon">public<wbr>Key</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="items" class="tsd-anchor"></a>
|
||||
<h3>items</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">items<span class="tsd-signature-symbol">:</span> <a href="svault.securevaultitem.html" class="tsd-signature-type">SecureVaultItem</a><span class="tsd-signature-symbol">[]</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:62</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="privatekey" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> private<wbr>Key</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">private<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:64</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="publickey" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagOptional">Optional</span> public<wbr>Key</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">public<wbr>Key<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:63</li>
|
||||
</ul>
|
||||
</aside>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class="current tsd-kind-namespace">
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-class tsd-parent-kind-namespace">
|
||||
<a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.securevaultlist.html#items" class="tsd-kind-icon">items</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.securevaultlist.html#privatekey" class="tsd-kind-icon">private<wbr>Key</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.securevaultlist.html#publickey" class="tsd-kind-icon">public<wbr>Key</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="../modules/svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
221
docs/interfaces/svault.storageitem.html
Normal file
221
docs/interfaces/svault.storageitem.html
Normal file
@@ -0,0 +1,221 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>StorageItem | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="svault.storageitem.html">StorageItem</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Interface StorageItem</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Interface for an vault item containing unencrypted data</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-hierarchy">
|
||||
<h3>Hierarchy</h3>
|
||||
<ul class="tsd-hierarchy">
|
||||
<li>
|
||||
<span class="target">StorageItem</span>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Properties</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.storageitem.html#d" class="tsd-kind-icon">d</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.storageitem.html#t" class="tsd-kind-icon">t</a></li>
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><a href="svault.storageitem.html#u" class="tsd-kind-icon">u</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Properties</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="d" class="tsd-anchor"></a>
|
||||
<h3>d</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">d<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:55</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>data</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="t" class="tsd-anchor"></a>
|
||||
<h3>t</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">t<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:57</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>tag (can be used to find specific items)</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface">
|
||||
<a name="u" class="tsd-anchor"></a>
|
||||
<h3>u</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">u<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:53</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>uuid</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="../modules/mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class="current tsd-kind-namespace">
|
||||
<a href="../modules/svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-class tsd-parent-kind-namespace">
|
||||
<a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="current">
|
||||
<li class="current tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
|
||||
<ul>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.storageitem.html#d" class="tsd-kind-icon">d</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.storageitem.html#t" class="tsd-kind-icon">t</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-property tsd-parent-kind-interface">
|
||||
<a href="svault.storageitem.html#u" class="tsd-kind-icon">u</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="after-current">
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="../modules/svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
484
docs/modules/mlgenerator.html
Normal file
484
docs/modules/mlgenerator.html
Normal file
@@ -0,0 +1,484 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>MLGenerator | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Namespace MLGenerator</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Namespace containing the code for Generating the Code and delivering the mails</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Interfaces</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-kind-icon">MLGen<wbr>Return</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Functions</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported"><a href="mlgenerator.html#generatecodes" class="tsd-kind-icon">generate<wbr>Codes</a></li>
|
||||
<li class="tsd-kind-function tsd-parent-kind-namespace"><a href="mlgenerator.html#generatetoken" class="tsd-kind-icon">generate<wbr>Token</a></li>
|
||||
<li class="tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported"><a href="mlgenerator.html#send" class="tsd-kind-icon">send</a></li>
|
||||
<li class="tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported"><a href="mlgenerator.html#sendmails" class="tsd-kind-icon">send<wbr>Mails</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Functions</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a name="generatecodes" class="tsd-anchor"></a>
|
||||
<h3>generate<wbr>Codes</h3>
|
||||
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<li class="tsd-signature tsd-kind-icon">generate<wbr>Codes<span class="tsd-signature-symbol">(</span>resolve<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span>, error<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>reason<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>, mailArray<span class="tsd-signature-symbol">: </span><a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span>, config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/generate.ts:79</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Generate the same amout of codes as distinct mail adresses and stores them to the list file
|
||||
This function also includes previously used tokens to prevent duplicate tokens.
|
||||
Rejects if matchfile cannot be saved.</p>
|
||||
</div>
|
||||
<dl class="tsd-comment-tags">
|
||||
<dt>internal</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>resolve: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Callback to resolve promise</p>
|
||||
</div>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter-signature">
|
||||
<ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
|
||||
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> value: <a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h5>error: <span class="tsd-signature-symbol">(</span>reason<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></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Callback to reject promise</p>
|
||||
</div>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter-signature">
|
||||
<ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
|
||||
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>reason<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>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> reason: <span class="tsd-signature-type">any</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h5>mailArray: <a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>list of mail adresses</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>config: <span class="tsd-signature-type">any</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Main configuration object
|
||||
This Function uses the following variables:
|
||||
usedTokens -> List of previosly used tokens
|
||||
outFileMatch -> Path to match file</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Main safe used for logging and storing data</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
|
||||
<a name="generatetoken" class="tsd-anchor"></a>
|
||||
<h3>generate<wbr>Token</h3>
|
||||
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
|
||||
<li class="tsd-signature tsd-kind-icon">generate<wbr>Token<span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/generate.ts:56</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Main function used to generate and deliver codes</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>config: <span class="tsd-signature-type">any</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Main configuration object</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Main safe used for logging and storing data</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">></span></h4>
|
||||
<p>used codes and processed mails</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a name="send" class="tsd-anchor"></a>
|
||||
<h3>send</h3>
|
||||
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<li class="tsd-signature tsd-kind-icon">send<span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, mail<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, code<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, template<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HandlebarsTemplateDelegate</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span>, mailserver<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Mail</span>, config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/generate.ts:206</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Reads template file and compiles template.
|
||||
Iterate through mails and codes, randomly assign code to mail and send mail to recipient.
|
||||
If dryrun is enabled, mails will not be sent and new mails won't be included in return.
|
||||
Rejects if template cannot be read.</p>
|
||||
</div>
|
||||
<dl class="tsd-comment-tags">
|
||||
<dt>internal</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>name: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Name of recpipient</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>mail: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Mail of recpipient</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>code: <span class="tsd-signature-type">string</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Code of recpipient</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>template: <span class="tsd-signature-type">HandlebarsTemplateDelegate</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>compiled mail template</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>mailserver: <span class="tsd-signature-type">Mail</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Mailserver settings</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>config: <span class="tsd-signature-type">any</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Main configuration object
|
||||
This Function uses the following variables:
|
||||
mail.auth.user -> sender mail adress
|
||||
mailFrom -> sender mail ailas
|
||||
dryrun -> Boolean value. If true no mails will be sent.</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Main safe used for logging and storing data</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a name="sendmails" class="tsd-anchor"></a>
|
||||
<h3>send<wbr>Mails</h3>
|
||||
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<li class="tsd-signature tsd-kind-icon">send<wbr>Mails<span class="tsd-signature-symbol">(</span>resolve<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span>, error<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>reason<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>, mailArray<span class="tsd-signature-symbol">: </span><a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span>, codeArray<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span>, config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/generate.ts:138</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Reads template file and compiles template.
|
||||
Iterate through mails and codes, randomly assign code to mail and send mail to recipient.
|
||||
If dryrun is enabled, mails will not be sent and new mails won't be included in return.
|
||||
Rejects if template cannot be read.</p>
|
||||
</div>
|
||||
<dl class="tsd-comment-tags">
|
||||
<dt>internal</dt>
|
||||
<dd></dd>
|
||||
</dl>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>resolve: <span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Callback to resolve promise</p>
|
||||
</div>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter-signature">
|
||||
<ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
|
||||
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>value<span class="tsd-signature-symbol">?: </span><a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> value: <a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-signature-type">MLGenReturn</a></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h5>error: <span class="tsd-signature-symbol">(</span>reason<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></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Callback to reject promise</p>
|
||||
</div>
|
||||
<ul class="tsd-parameters">
|
||||
<li class="tsd-parameter-signature">
|
||||
<ul class="tsd-signatures tsd-kind-type-literal tsd-is-not-exported">
|
||||
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>reason<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>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5><span class="tsd-flag ts-flagOptional">Optional</span> reason: <span class="tsd-signature-type">any</span></h5>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h5>mailArray: <a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>list of mail adresses</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>codeArray: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>list of generated codes</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>config: <span class="tsd-signature-type">any</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Main configuration object
|
||||
This Function uses the following variables:
|
||||
htmlPath -> Path to html template
|
||||
dryrun -> Boolean value. If true no mails will be sent and list won't be updated.
|
||||
force -> Boolean value. If true all mails are resent.
|
||||
usedTokens -> Array of Strings. Specifies already used tokens adresses.
|
||||
usedMails -> Array of Strings. Specifies already served mail adresses.
|
||||
mail -> mailserver settings</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Main safe used for logging and storing data</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span></h4>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class="current tsd-kind-namespace">
|
||||
<a href="mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/mlgenerator.mlgenreturn.html" class="tsd-kind-icon">MLGen<wbr>Return</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="mlgenerator.html#generatecodes" class="tsd-kind-icon">generate<wbr>Codes</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace">
|
||||
<a href="mlgenerator.html#generatetoken" class="tsd-kind-icon">generate<wbr>Token</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="mlgenerator.html#send" class="tsd-kind-icon">send</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="mlgenerator.html#sendmails" class="tsd-kind-icon">send<wbr>Mails</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
188
docs/modules/mlparser.html
Normal file
188
docs/modules/mlparser.html
Normal file
@@ -0,0 +1,188 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>MLParser | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="mlparser.html">MLParser</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Namespace MLParser</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Namespace containing the code for Parsing the mail list.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Interfaces</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/mlparser.mlitem.html" class="tsd-kind-icon">MLItem</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Functions</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-function tsd-parent-kind-namespace"><a href="mlparser.html#parsemails" class="tsd-kind-icon">parse<wbr>Mails</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group ">
|
||||
<h2>Functions</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-function tsd-parent-kind-namespace">
|
||||
<a name="parsemails" class="tsd-anchor"></a>
|
||||
<h3>parse<wbr>Mails</h3>
|
||||
<ul class="tsd-signatures tsd-kind-function tsd-parent-kind-namespace">
|
||||
<li class="tsd-signature tsd-kind-icon">parse<wbr>Mails<span class="tsd-signature-symbol">(</span>config<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, dataSafe<span class="tsd-signature-symbol">: </span><a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></li>
|
||||
</ul>
|
||||
<ul class="tsd-descriptions">
|
||||
<li class="tsd-description">
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/mailParser.ts:54</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Encrypts and appends data to SecureVault.
|
||||
Also writes data to transaction log using @function writeTransaction</p>
|
||||
</div>
|
||||
</div>
|
||||
<h4 class="tsd-parameters-title">Parameters</h4>
|
||||
<ul class="tsd-parameters">
|
||||
<li>
|
||||
<h5>config: <span class="tsd-signature-type">any</span></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Reference to config object.
|
||||
This Function uses the following variables:
|
||||
inFileMail -> String reference to mail list
|
||||
force -> Boolean value. If true all mails are resent.
|
||||
usedMails -> Array of Strings. Specifies already served mail adresses.</p>
|
||||
</div>
|
||||
</li>
|
||||
<li>
|
||||
<h5>dataSafe: <a href="../classes/svault.securevault.html" class="tsd-signature-type">SecureVault</a></h5>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<p>Reference to safe object. This is needed for writing to the vault.log file</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/mlparser.mlitem.html" class="tsd-signature-type">MLItem</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">></span></h4>
|
||||
<p>Returns an array of all parsed mail adresses as promise</p>
|
||||
</li>
|
||||
</ul>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class="current tsd-kind-namespace">
|
||||
<a href="mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/mlparser.mlitem.html" class="tsd-kind-icon">MLItem</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-function tsd-parent-kind-namespace">
|
||||
<a href="mlparser.html#parsemails" class="tsd-kind-icon">parse<wbr>Mails</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
177
docs/modules/svault.html
Normal file
177
docs/modules/svault.html
Normal file
@@ -0,0 +1,177 @@
|
||||
<!doctype html>
|
||||
<html class="default no-js">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>SVault | opentoken</title>
|
||||
<meta name="description" content="Documentation for opentoken">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="../assets/css/main.css">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<div class="tsd-page-toolbar">
|
||||
<div class="container">
|
||||
<div class="table-wrap">
|
||||
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
|
||||
<div class="field">
|
||||
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
|
||||
<input id="tsd-search-field" type="text" />
|
||||
</div>
|
||||
<ul class="results">
|
||||
<li class="state loading">Preparing search index...</li>
|
||||
<li class="state failure">The search index is not available</li>
|
||||
</ul>
|
||||
<a href="../index.html" class="title">opentoken</a>
|
||||
</div>
|
||||
<div class="table-cell" id="tsd-widgets">
|
||||
<div id="tsd-filter">
|
||||
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
|
||||
<div class="tsd-filter-group">
|
||||
<div class="tsd-select" id="tsd-filter-visibility">
|
||||
<span class="tsd-select-label">All</span>
|
||||
<ul class="tsd-select-list">
|
||||
<li data-value="public">Public</li>
|
||||
<li data-value="protected">Public/Protected</li>
|
||||
<li data-value="private" class="selected">All</li>
|
||||
</ul>
|
||||
</div>
|
||||
<input type="checkbox" id="tsd-filter-inherited" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
|
||||
<input type="checkbox" id="tsd-filter-externals" checked />
|
||||
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
|
||||
<input type="checkbox" id="tsd-filter-only-exported" />
|
||||
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
|
||||
</div>
|
||||
</div>
|
||||
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tsd-page-title">
|
||||
<div class="container">
|
||||
<ul class="tsd-breadcrumb">
|
||||
<li>
|
||||
<a href="../globals.html">Globals</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
<h1>Namespace SVault</h1>
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
<div class="container container-main">
|
||||
<div class="row">
|
||||
<div class="col-8 col-content">
|
||||
<section class="tsd-panel tsd-comment">
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>Namespace containing the code for the SecureVault.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-index-group">
|
||||
<h2>Index</h2>
|
||||
<section class="tsd-panel tsd-index-panel">
|
||||
<div class="tsd-index-content">
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Classes</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-class tsd-parent-kind-namespace"><a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section ">
|
||||
<h3>Interfaces</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a></li>
|
||||
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a></li>
|
||||
<li class="tsd-kind-interface tsd-parent-kind-namespace"><a href="../interfaces/svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
<section class="tsd-index-section tsd-is-not-exported">
|
||||
<h3>Variables</h3>
|
||||
<ul class="tsd-index-list">
|
||||
<li class="tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported"><a href="svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a></li>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section class="tsd-panel-group tsd-member-group tsd-is-not-exported">
|
||||
<h2>Variables</h2>
|
||||
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a name="vaultversion" class="tsd-anchor"></a>
|
||||
<h3><span class="tsd-flag ts-flagConst">Const</span> vault<wbr>Version</h3>
|
||||
<div class="tsd-signature tsd-kind-icon">vault<wbr>Version<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"v1.2"</span><span class="tsd-signature-symbol"> = "v1.2"</span></div>
|
||||
<aside class="tsd-sources">
|
||||
<ul>
|
||||
<li>Defined in src/vault.ts:36</li>
|
||||
</ul>
|
||||
</aside>
|
||||
<div class="tsd-comment tsd-typography">
|
||||
<div class="lead">
|
||||
<p>vault version number. This variable will be added to the safe file and is used to chack compatibility.</p>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
||||
<nav class="tsd-navigation primary">
|
||||
<ul>
|
||||
<li class="globals ">
|
||||
<a href="../globals.html"><em>Globals</em></a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="mlgenerator.html">MLGenerator</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-namespace">
|
||||
<a href="mlparser.html">MLParser</a>
|
||||
</li>
|
||||
<li class="current tsd-kind-namespace">
|
||||
<a href="svault.html">SVault</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<nav class="tsd-navigation secondary menu-sticky">
|
||||
<ul class="before-current">
|
||||
<li class=" tsd-kind-class tsd-parent-kind-namespace">
|
||||
<a href="../classes/svault.securevault.html" class="tsd-kind-icon">Secure<wbr>Vault</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/svault.securevaultitem.html" class="tsd-kind-icon">Secure<wbr>Vault<wbr>Item</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/svault.storageitem.html" class="tsd-kind-icon">Storage<wbr>Item</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-interface tsd-parent-kind-namespace">
|
||||
<a href="../interfaces/svault.securevaultlist.html" class="tsd-kind-icon">secure<wbr>Vault<wbr>List</a>
|
||||
</li>
|
||||
<li class=" tsd-kind-variable tsd-parent-kind-namespace tsd-is-not-exported">
|
||||
<a href="svault.html#vaultversion" class="tsd-kind-icon">vault<wbr>Version</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer class="with-border-bottom">
|
||||
<div class="container">
|
||||
<h2>Legend</h2>
|
||||
<div class="tsd-legend-group">
|
||||
<ul class="tsd-legend">
|
||||
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
<div class="container tsd-generator">
|
||||
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
|
||||
</div>
|
||||
<div class="overlay"></div>
|
||||
<script src="../assets/js/main.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
39
index.ts
39
index.ts
@@ -1,7 +1,28 @@
|
||||
/**
|
||||
* Dennis Gunia (c) 2020
|
||||
*
|
||||
* Entry point for opentoken. This file parses the cli parameters and runs the specified actions with the specified ßparameters.
|
||||
*
|
||||
*
|
||||
* @summary Open-Token entry point
|
||||
* @author Dennis Gunia <info@dennisgunia.de>
|
||||
* @license Licensed under the Apache License, Version 2.0 (the "License").
|
||||
*
|
||||
* You may not use this file except in compliance with the License.
|
||||
* A copy of the License is located at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
import * as fs from 'fs'
|
||||
import { generateToken } from './src/generate'
|
||||
import { SecureVault } from './src/vault'
|
||||
import { exit } from 'process';
|
||||
import { OTGlobalConfig } from './src/config.type';
|
||||
import { MLGenerator } from './src/generate';
|
||||
import { SVault } from './src/vault'
|
||||
|
||||
let configPath = "", action = -1, pubKey = "", privKey = "", safeFile = "", mails = "", html = "", dryrun = false, force = false;
|
||||
// parse cli args
|
||||
@@ -53,13 +74,13 @@ if (!html && action == 1){ throw new Error("Mail-Template not specified") }
|
||||
|
||||
|
||||
if (action == 1){
|
||||
let dataSafe: SecureVault = new SecureVault(pubKey,privKey);
|
||||
let dataSafe: SVault.SecureVault = new SVault.SecureVault(pubKey,privKey);
|
||||
dataSafe.writeTransaction(`Started ...`);
|
||||
// load config
|
||||
const confRaw = fs.readFileSync(configPath, 'utf8')
|
||||
let config:any = {}
|
||||
let config: OTGlobalConfig = JSON.parse(confRaw)
|
||||
let addition: boolean = false; // wenn nur weitere hinzugefügt werden
|
||||
config = JSON.parse(confRaw)
|
||||
|
||||
// load safe if present
|
||||
if (fs.existsSync(safeFile)){
|
||||
dataSafe.loadData(safeFile);
|
||||
@@ -80,7 +101,7 @@ if (action == 1){
|
||||
console.error("Cannote read config file!")
|
||||
process.exit(100);
|
||||
}
|
||||
generateToken(config,dataSafe).then(el => {
|
||||
MLGenerator.generateToken(config,dataSafe).then(el => {
|
||||
if (addition){
|
||||
dataSafe.setStorage(dataSafe.findStorage("usedTokens")[0].u,el.codes)
|
||||
dataSafe.setStorage(dataSafe.findStorage("usedMails")[0].u,el.mails)
|
||||
@@ -96,11 +117,11 @@ if (action == 1){
|
||||
console.error("error", err)
|
||||
})
|
||||
}else if(action == 2){
|
||||
let dataSafe: SecureVault = new SecureVault(pubKey,privKey);
|
||||
let dataSafe: SVault.SecureVault = new SVault.SecureVault(pubKey,privKey);
|
||||
dataSafe.loadData(safeFile);
|
||||
dataSafe.decryptData();
|
||||
}else if(action == 3){
|
||||
SecureVault.genKey(pubKey,privKey);
|
||||
SVault.SecureVault.genKey(pubKey,privKey);
|
||||
}
|
||||
|
||||
|
||||
|
||||
46
src/config.type.ts
Normal file
46
src/config.type.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Dennis Gunia (c) 2020
|
||||
*
|
||||
* Interface for global config object
|
||||
*
|
||||
* @summary Open-Token entry point
|
||||
* @author Dennis Gunia <info@dennisgunia.de>
|
||||
* @license Licensed under the Apache License, Version 2.0 (the "License").
|
||||
*
|
||||
* You may not use this file except in compliance with the License.
|
||||
* A copy of the License is located at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
import SMTPTransport from 'nodemailer/lib/smtp-transport';
|
||||
import { MLParser } from './mailParser';
|
||||
|
||||
/** Interface containing all config properties for opentoken */
|
||||
export interface OTGlobalConfig {
|
||||
/** nodemailer SMTP configuration */
|
||||
mail: SMTPTransport,
|
||||
/** sender alias */
|
||||
mailFrom: string,
|
||||
/** path to file containing matches */
|
||||
outFileMatch: string
|
||||
/** path to file containing mails */
|
||||
inFileMail?: string
|
||||
/** path to file containing mail template */
|
||||
htmlPath?: string
|
||||
|
||||
/** List of used tokens */
|
||||
usedTokens? : string[]
|
||||
/** List of used mail adresses */
|
||||
usedMails? : MLParser.MLItem[]
|
||||
|
||||
/** switch for dryrun */
|
||||
dryrun: boolean
|
||||
/** switch for force */
|
||||
force: boolean
|
||||
}
|
||||
352
src/generate.ts
352
src/generate.ts
@@ -1,151 +1,233 @@
|
||||
/**
|
||||
* Dennis Gunia (c) 2020
|
||||
*
|
||||
* Generator Implementation.
|
||||
* This File provides the implementation of the code generator and mail sending functionality.
|
||||
*
|
||||
*
|
||||
* @summary Generator Implementation.
|
||||
* @author Dennis Gunia <info@dennisgunia.de>
|
||||
* @license Licensed under the Apache License, Version 2.0 (the "License").
|
||||
*
|
||||
* You may not use this file except in compliance with the License.
|
||||
* A copy of the License is located at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
import * as nodemailer from 'nodemailer';
|
||||
import * as cliProgress from 'cli-progress'
|
||||
import { shuffleArray } from './util/shuffle';
|
||||
import { mkstring } from './util/token';
|
||||
|
||||
import * as Handlebars from "handlebars";
|
||||
import Mail from 'nodemailer/lib/mailer';
|
||||
import { SecureVault } from './vault';
|
||||
import { parseMails } from './mailParser';
|
||||
import { SVault } from './vault';
|
||||
import { MLParser } from './mailParser';
|
||||
import { shuffleArray } from './util/shuffle';
|
||||
import { delay, mkstringCN } from './util/misc';
|
||||
|
||||
interface mail{
|
||||
mail: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface genReturn{
|
||||
codes: string[];
|
||||
mails: mail[];
|
||||
}
|
||||
|
||||
export function generateToken(config: any,dataSafe: SecureVault): Promise<genReturn>{
|
||||
return new Promise<genReturn>((resolve,error) => {
|
||||
parseMails(config, dataSafe).then(res => {
|
||||
generateCodes(resolve,error,res,config,dataSafe);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// generate codes
|
||||
async function generateCodes(resolve: (value?: genReturn) => void,error: (reason?: any) => void,mailArray: mail[],config: any,dataSafe: SecureVault){
|
||||
console.log("\nGenerating codes")
|
||||
const pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
|
||||
pbar.start(mailArray.length, 0,{
|
||||
speed: "N/A"
|
||||
});
|
||||
let position = 0;
|
||||
|
||||
let codeArray: string[] = [];
|
||||
let checkString: string = '';
|
||||
|
||||
for(let i = 0; i < mailArray.length; i++){ // as many codes as adresses
|
||||
// check that codes are unique
|
||||
let code = '';
|
||||
do{
|
||||
code = mkstring(4);
|
||||
}while ( (config.force ? codeArray : [...codeArray, ...config.usedTokens]).includes(code))
|
||||
codeArray.push(code);
|
||||
checkString = `${checkString}|${code}`
|
||||
position ++;
|
||||
pbar.update(position);
|
||||
/**
|
||||
* Namespace containing the code for Generating the Code and delivering the mails
|
||||
*/
|
||||
export namespace MLGenerator {
|
||||
|
||||
/**
|
||||
* Interface used to Return codes and mails form the main Function {@link generateToken}
|
||||
*/
|
||||
export interface MLGenReturn{
|
||||
/** List of generated codes */
|
||||
codes: string[];
|
||||
/** List of processed mails */
|
||||
mails: MLParser.MLItem[];
|
||||
}
|
||||
checkString = checkString.substr(1);
|
||||
pbar.stop();
|
||||
//write code lists
|
||||
try {
|
||||
if (!fs.existsSync(path.dirname(config.outFileMatch))){
|
||||
fs.mkdirSync(path.dirname(config.outFileMatch));
|
||||
}
|
||||
fs.writeFileSync(config.outFileMatch, checkString);
|
||||
} catch (err) {
|
||||
|
||||
error(err);
|
||||
}
|
||||
sendMails(resolve,error,mailArray,codeArray,config,dataSafe);
|
||||
}
|
||||
|
||||
|
||||
// randomize mails and tokens
|
||||
async function sendMails(resolve: (value?: genReturn) => void,error: (reason?: any) => void,mailArray: mail[],codeArray: string[],config: any,dataSafe: SecureVault){
|
||||
let mailserver = nodemailer.createTransport(config.mail);
|
||||
// read mail template
|
||||
let template!: HandlebarsTemplateDelegate<any>;
|
||||
try {
|
||||
const htmlSrc=fs.readFileSync(config.htmlPath, "utf8")
|
||||
template = Handlebars.compile(htmlSrc)
|
||||
} catch (error) {
|
||||
console.error("Cannote read template file!")
|
||||
error(error);
|
||||
}
|
||||
|
||||
console.log("\nSending mails")
|
||||
const pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
|
||||
pbar.start(mailArray.length, 0,{
|
||||
speed: "N/A"
|
||||
});
|
||||
let position = 0;
|
||||
|
||||
shuffleArray(mailArray);
|
||||
shuffleArray(codeArray);
|
||||
if (config.force){dataSafe.clearVault();}
|
||||
for(let i = 0; i < mailArray.length; i++){
|
||||
// send mail
|
||||
dataSafe.writeTransaction(`process: ${mailArray[i].mail}`);
|
||||
if (!config.dryrun){
|
||||
dataSafe.pushData({
|
||||
name: mailArray[i].name,
|
||||
mail: mailArray[i].mail,
|
||||
code: codeArray[i]
|
||||
|
||||
/**
|
||||
* Main function used to generate and deliver codes
|
||||
* @param config Main configuration object
|
||||
* @param dataSafe Main safe used for logging and storing data
|
||||
* @returns used codes and processed mails
|
||||
*/
|
||||
export function generateToken(config: any,dataSafe: SVault.SecureVault): Promise<MLGenReturn>{
|
||||
return new Promise<MLGenReturn>((resolve,error) => {
|
||||
MLParser.parseMails(config, dataSafe).then(res => {
|
||||
// next step
|
||||
generateCodes(resolve,error,res,config,dataSafe);
|
||||
})
|
||||
}
|
||||
await send(mailArray[i].name, mailArray[i].mail, codeArray[i],template,mailserver,config,dataSafe);
|
||||
position ++;
|
||||
pbar.update(position);
|
||||
});
|
||||
}
|
||||
pbar.stop();
|
||||
shuffleArray(mailArray);
|
||||
shuffleArray(codeArray);
|
||||
shuffleArray(mailArray);
|
||||
shuffleArray(codeArray);
|
||||
resolve({
|
||||
codes: config.force ? codeArray : (config.dryrun ? config.usedTokens : [...codeArray, ...config.usedTokens]),
|
||||
mails: config.force ? mailArray : (config.dryrun ? config.usedMails : [...mailArray, ...config.usedMails])
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
async function send(name: string, mail: string, code: string,template: HandlebarsTemplateDelegate<any>,mailserver: Mail,config: any,dataSafe: SecureVault){
|
||||
if (config.dryrun){
|
||||
await delay(100);
|
||||
console.log(`\n\x1b[36m -> dryrun: would send to ${mail}\x1b[0m`);
|
||||
}else{
|
||||
// fill template
|
||||
let html = template({
|
||||
"name": name,
|
||||
"mail": mail,
|
||||
"code": code
|
||||
})
|
||||
let mailOptions = {
|
||||
from: `${config.mailFrom} <${config.mail.auth.user}>`, // sender address
|
||||
to: mail, // list of receivers
|
||||
subject: `Dein Zugangscode zur BJR Wahl`, // Subject line
|
||||
html: html
|
||||
};
|
||||
|
||||
/**
|
||||
* Generate the same amout of codes as distinct mail adresses and stores them to the list file
|
||||
* This function also includes previously used tokens to prevent duplicate tokens.
|
||||
* Rejects if matchfile cannot be saved.
|
||||
* @internal
|
||||
* @param resolve Callback to resolve promise
|
||||
* @param error Callback to reject promise
|
||||
* @param mailArray list of mail adresses
|
||||
* @param config Main configuration object
|
||||
* This Function uses the following variables:
|
||||
* usedTokens -> List of previosly used tokens
|
||||
* outFileMatch -> Path to match file
|
||||
* @param dataSafe Main safe used for logging and storing data
|
||||
*/
|
||||
async function generateCodes(resolve: (value?: MLGenReturn) => void,error: (reason?: any) => void,mailArray: MLParser.MLItem[],config: any,dataSafe: SVault.SecureVault){
|
||||
console.log("\nGenerating codes")
|
||||
const pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
|
||||
pbar.start(mailArray.length, 0,{
|
||||
speed: "N/A"
|
||||
});
|
||||
let position = 0;
|
||||
|
||||
let codeArray: string[] = [];
|
||||
let checkString: string = '';
|
||||
|
||||
for(let i = 0; i < mailArray.length; i++){ // as many codes as adresses
|
||||
// check that codes are unique
|
||||
let code = '';
|
||||
do{
|
||||
code = mkstringCN(4);
|
||||
}while ( (config.force ? codeArray : [...codeArray, ...config.usedTokens]).includes(code))
|
||||
codeArray.push(code);
|
||||
checkString = `${checkString}|${code}`
|
||||
position ++;
|
||||
pbar.update(position);
|
||||
}
|
||||
checkString = checkString.substr(1);
|
||||
pbar.stop();
|
||||
//write code lists
|
||||
try {
|
||||
await mailserver.sendMail(mailOptions);
|
||||
dataSafe.writeTransaction(` -> mail sent`);
|
||||
if (!fs.existsSync(path.dirname(config.outFileMatch))){
|
||||
fs.mkdirSync(path.dirname(config.outFileMatch));
|
||||
}
|
||||
fs.writeFileSync(config.outFileMatch, checkString);
|
||||
} catch (err) {
|
||||
|
||||
error(err);
|
||||
}
|
||||
// next
|
||||
sendMails(resolve,error,mailArray,codeArray,config,dataSafe);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Reads template file and compiles template.
|
||||
* Iterate through mails and codes, randomly assign code to mail and send mail to recipient.
|
||||
* If dryrun is enabled, mails will not be sent and new mails won't be included in return.
|
||||
* Rejects if template cannot be read.
|
||||
* @internal
|
||||
* @param resolve Callback to resolve promise
|
||||
* @param error Callback to reject promise
|
||||
* @param mailArray list of mail adresses
|
||||
* @param codeArray list of generated codes
|
||||
* @param config Main configuration object
|
||||
* This Function uses the following variables:
|
||||
* htmlPath -> Path to html template
|
||||
* dryrun -> Boolean value. If true no mails will be sent and list won't be updated.
|
||||
* force -> Boolean value. If true all mails are resent.
|
||||
* usedTokens -> Array of Strings. Specifies already used tokens adresses.
|
||||
* usedMails -> Array of Strings. Specifies already served mail adresses.
|
||||
* mail -> mailserver settings
|
||||
* @param dataSafe Main safe used for logging and storing data
|
||||
*/
|
||||
async function sendMails(resolve: (value?: MLGenReturn) => void,error: (reason?: any) => void,mailArray: MLParser.MLItem[],codeArray: string[],config: any,dataSafe: SVault.SecureVault){
|
||||
let mailserver = nodemailer.createTransport(config.mail);
|
||||
// read mail template and compile
|
||||
let template!: HandlebarsTemplateDelegate<any>;
|
||||
try {
|
||||
const htmlSrc=fs.readFileSync(config.htmlPath, "utf8")
|
||||
template = Handlebars.compile(htmlSrc)
|
||||
} catch (error) {
|
||||
console.log(`Error sendign mail to ${mail} : ${error}`)
|
||||
dataSafe.writeTransaction(` -> mail failed : ${error}`);
|
||||
console.error("Cannote read template file!")
|
||||
error(error);
|
||||
}
|
||||
|
||||
// send mails
|
||||
console.log("\nSending mails")
|
||||
const pbar = new cliProgress.SingleBar({}, cliProgress.Presets.shades_classic);
|
||||
pbar.start(mailArray.length, 0,{
|
||||
speed: "N/A"
|
||||
});
|
||||
let position = 0;
|
||||
|
||||
// randomize arrays
|
||||
shuffleArray(mailArray);
|
||||
shuffleArray(codeArray);
|
||||
if (config.force){dataSafe.clearVault();}
|
||||
for(let i = 0; i < mailArray.length; i++){
|
||||
// send mail
|
||||
dataSafe.writeTransaction(`process: ${mailArray[i].mail}`);
|
||||
if (!config.dryrun){
|
||||
dataSafe.pushData({
|
||||
name: mailArray[i].name,
|
||||
mail: mailArray[i].mail,
|
||||
code: codeArray[i]
|
||||
})
|
||||
}
|
||||
await send(mailArray[i].name, mailArray[i].mail, codeArray[i],template,mailserver,config,dataSafe);
|
||||
position ++;
|
||||
pbar.update(position);
|
||||
}
|
||||
pbar.stop();
|
||||
shuffleArray(mailArray);
|
||||
shuffleArray(codeArray);
|
||||
shuffleArray(mailArray);
|
||||
shuffleArray(codeArray);
|
||||
resolve({
|
||||
codes: config.force ? codeArray : (config.dryrun ? config.usedTokens : [...codeArray, ...config.usedTokens]),
|
||||
mails: config.force ? mailArray : (config.dryrun ? config.usedMails : [...mailArray, ...config.usedMails])
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads template file and compiles template.
|
||||
* Iterate through mails and codes, randomly assign code to mail and send mail to recipient.
|
||||
* If dryrun is enabled, mails will not be sent and new mails won't be included in return.
|
||||
* Rejects if template cannot be read.
|
||||
* @internal
|
||||
* @param name Name of recpipient
|
||||
* @param mail Mail of recpipient
|
||||
* @param code Code of recpipient
|
||||
* @param template compiled mail template
|
||||
* @param mailserver Mailserver settings
|
||||
* @param config Main configuration object
|
||||
* This Function uses the following variables:
|
||||
* mail.auth.user -> sender mail adress
|
||||
* mailFrom -> sender mail ailas
|
||||
* dryrun -> Boolean value. If true no mails will be sent.
|
||||
* @param dataSafe Main safe used for logging and storing data
|
||||
*/
|
||||
async function send(name: string, mail: string, code: string,template: HandlebarsTemplateDelegate<any>,mailserver: Mail,config: any,dataSafe: SVault.SecureVault){
|
||||
if (config.dryrun){
|
||||
await delay(100);
|
||||
console.log(`\n\x1b[36m -> dryrun: would send to ${mail}\x1b[0m`);
|
||||
}else{
|
||||
// fill template
|
||||
let html = template({
|
||||
"name": name,
|
||||
"mail": mail,
|
||||
"code": code
|
||||
})
|
||||
let mailOptions = {
|
||||
from: `${config.mailFrom} <${config.mail.auth.user}>`, // sender address
|
||||
to: mail, // list of receivers
|
||||
subject: `Dein Zugangscode zur BJR Wahl`, // Subject line
|
||||
html: html
|
||||
};
|
||||
try {
|
||||
await mailserver.sendMail(mailOptions);
|
||||
dataSafe.writeTransaction(` -> mail sent`);
|
||||
} catch (error) {
|
||||
console.log(`Error sendign mail to ${mail} : ${error}`)
|
||||
dataSafe.writeTransaction(` -> mail failed : ${error}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function delay(t: number, val?: number) {
|
||||
return new Promise(function(resolve) {
|
||||
setTimeout(function() {
|
||||
resolve(val);
|
||||
}, t);
|
||||
});
|
||||
}
|
||||
@@ -1,70 +1,118 @@
|
||||
/**
|
||||
* Dennis Gunia (c) 2020
|
||||
*
|
||||
* MailParser Implementation.
|
||||
* This File provides a vault for storing encrypted and unencrypted data. Each encrypted element will be encrypted before storing it in an array.
|
||||
* Each element (encrypted or unencrypted) ist stored in an array with an unique identifier.
|
||||
* Safes can be stored and loaded. Unencrypted data can be stored, retrieved and modified. Encrypted data can be stored and retrieved.
|
||||
* This class also implements an transaction function.
|
||||
*
|
||||
* @summary SecureVault Class Implementation
|
||||
* @author Dennis Gunia <info@dennisgunia.de>
|
||||
* @license Licensed under the Apache License, Version 2.0 (the "License").
|
||||
*
|
||||
* You may not use this file except in compliance with the License.
|
||||
* A copy of the License is located at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
import * as fs from 'fs'
|
||||
import { SecureVault } from "./vault";
|
||||
import { SVault } from "./vault";
|
||||
|
||||
export interface MLItem{
|
||||
mail: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export function parseMails(config: any, dataSafe: SecureVault) {
|
||||
return new Promise<MLItem[]>((resolve,reject) => {
|
||||
let mailArray: MLItem[] = [];
|
||||
let currSection: string = "global";
|
||||
let lineCounter: number = 0;
|
||||
let curCounter: number = 0;
|
||||
|
||||
|
||||
console.log(`Reading mails for section ${currSection}`)
|
||||
// read and process mail list
|
||||
let readline = require('readline'),
|
||||
instream = fs.createReadStream(config.inFileMail),
|
||||
outstream = new (require('stream'))(),
|
||||
rl = readline.createInterface(instream, outstream);
|
||||
|
||||
rl.on('line', function (line:string) {
|
||||
lineCounter ++;
|
||||
if(line.startsWith('[')){
|
||||
if(line.endsWith(']')){
|
||||
console.log(`Read ${curCounter} adresses for section ${currSection}`)
|
||||
curCounter = 0;
|
||||
currSection=line.substring(1,line.length -1);
|
||||
console.log(`Reading mails for section ${currSection}`)
|
||||
}else{
|
||||
console.error(`Error parsing section on line ${lineCounter}: Syntax Error. Missing closing bracket ]`)
|
||||
}
|
||||
}else if (!line.startsWith('#')){
|
||||
const ix = line.indexOf(";")
|
||||
if (ix !== -1){
|
||||
// check if already exist
|
||||
dataSafe.writeTransaction(`reading mail ${line.substr(0,ix)} from category ${currSection}`);
|
||||
if (config.force || config.usedMails.filter((el: MLItem) => el.mail == line.substr(0,ix)).length == 0){
|
||||
// check for duplicate
|
||||
if ( mailArray.filter((el: MLItem) => el.mail == line.substr(0,ix)).length == 0){
|
||||
mailArray.push({
|
||||
mail: line.substr(0,ix),
|
||||
name: line.substr(ix + 1)
|
||||
})
|
||||
curCounter ++;
|
||||
/**
|
||||
* Namespace containing the code for Parsing the mail list.
|
||||
*/
|
||||
export namespace MLParser{
|
||||
/**
|
||||
* Interface containing properties of a single mail line
|
||||
*/
|
||||
export interface MLItem{
|
||||
/** mail adress parsed form file */
|
||||
mail: string;
|
||||
/** name parsed form file */
|
||||
name: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Encrypts and appends data to SecureVault.
|
||||
* Also writes data to transaction log using @function writeTransaction
|
||||
* @param config - Reference to config object.
|
||||
* This Function uses the following variables:
|
||||
* inFileMail -> String reference to mail list
|
||||
* force -> Boolean value. If true all mails are resent.
|
||||
* usedMails -> Array of Strings. Specifies already served mail adresses.
|
||||
*
|
||||
* @param dataSafe - Reference to safe object. This is needed for writing to the vault.log file
|
||||
* @return Returns an array of all parsed mail adresses as promise
|
||||
*/
|
||||
export function parseMails(config: any, dataSafe: SVault.SecureVault) {
|
||||
return new Promise<MLItem[]>((resolve,reject) => {
|
||||
let mailArray: MLItem[] = [];
|
||||
let currSection: string = "global";
|
||||
let lineCounter: number = 0;
|
||||
let curCounter: number = 0;
|
||||
|
||||
|
||||
console.log(`Reading mails for section ${currSection}`)
|
||||
// read and process mail list
|
||||
let readline = require('readline'),
|
||||
instream = fs.createReadStream(config.inFileMail),
|
||||
outstream = new (require('stream'))(),
|
||||
rl = readline.createInterface(instream, outstream);
|
||||
|
||||
rl.on('line', function (line:string) {
|
||||
lineCounter ++;
|
||||
if(line.startsWith('[')){
|
||||
if(line.endsWith(']')){
|
||||
console.log(`Read ${curCounter} adresses for section ${currSection}`)
|
||||
curCounter = 0;
|
||||
currSection=line.substring(1,line.length -1);
|
||||
console.log(`Reading mails for section ${currSection}`)
|
||||
}else{
|
||||
console.error(`Error parsing section on line ${lineCounter}: Syntax Error. Missing closing bracket ]`)
|
||||
}
|
||||
}else if (!line.startsWith('#')){
|
||||
const ix = line.indexOf(";")
|
||||
if (ix !== -1){
|
||||
// check if already exist
|
||||
dataSafe.writeTransaction(`reading mail ${line.substr(0,ix)} from category ${currSection}`);
|
||||
if (config.force || config.usedMails.filter((el: MLItem) => el.mail == line.substr(0,ix)).length == 0){
|
||||
// check for duplicate
|
||||
if ( mailArray.filter((el: MLItem) => el.mail == line.substr(0,ix)).length == 0){
|
||||
mailArray.push({
|
||||
mail: line.substr(0,ix),
|
||||
name: line.substr(ix + 1)
|
||||
})
|
||||
curCounter ++;
|
||||
}else{
|
||||
dataSafe.writeTransaction(` -> duplicate mail. Skipping`);
|
||||
console.error(`Skipping ${line.substr(0,ix)}: Duplicate`)
|
||||
}
|
||||
}else{
|
||||
dataSafe.writeTransaction(` -> duplicate mail. Skipping`);
|
||||
console.error(`Skipping ${line.substr(0,ix)}: Duplicate`)
|
||||
dataSafe.writeTransaction(` -> already exists. Skipping`);
|
||||
console.error(`Skipping ${line.substr(0,ix)}: Already sent`)
|
||||
}
|
||||
}else{
|
||||
dataSafe.writeTransaction(` -> already exists. Skipping`);
|
||||
console.error(`Skipping ${line.substr(0,ix)}: Already sent`)
|
||||
console.error(`Error parsing mail on line ${lineCounter}: Syntax Error. Missing ;`)
|
||||
}
|
||||
}else{
|
||||
console.error(`Error parsing mail on line ${lineCounter}: Syntax Error. Missing ;`)
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
rl.on('close', function (line:string) {
|
||||
// next step
|
||||
console.log(`Read ${curCounter} adresses for section ${currSection}\n${mailArray.length} mails read!`)
|
||||
resolve(mailArray);
|
||||
});
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
rl.on('close', function (line:string) {
|
||||
// next step
|
||||
console.log(`Read ${curCounter} adresses for section ${currSection}\n${mailArray.length} mails read!`)
|
||||
resolve(mailArray);
|
||||
});
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
50
src/util/misc.ts
Normal file
50
src/util/misc.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
/**
|
||||
* Dennis Gunia (c) 2020
|
||||
*
|
||||
* Reusable functions for different projects.
|
||||
*
|
||||
* @summary Open-Token entry point
|
||||
* @author Dennis Gunia <info@dennisgunia.de>
|
||||
* @license Licensed under the Apache License, Version 2.0 (the "License").
|
||||
*
|
||||
* You may not use this file except in compliance with the License.
|
||||
* A copy of the License is located at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Generate random string with specified length.
|
||||
* Generates only numbers and capital letters.
|
||||
* @param length length of String
|
||||
* @return generated string
|
||||
*/
|
||||
export function mkstringCN (length:number ) {
|
||||
var result = '';
|
||||
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
||||
var charactersLength = characters.length;
|
||||
for ( var i = 0; i < length; i++ ) {
|
||||
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Wraps setTimeout into Promise
|
||||
* @param t Millisceonds
|
||||
*/
|
||||
export function delay(t: number) {
|
||||
return new Promise(function(resolve) {
|
||||
setTimeout(function() {
|
||||
resolve();
|
||||
}, t);
|
||||
});
|
||||
}
|
||||
@@ -1,3 +1,7 @@
|
||||
/**
|
||||
* Randomize items in an array
|
||||
* @param array Array to be shuffeled
|
||||
*/
|
||||
export function shuffleArray(array: any[]) {
|
||||
for (var i = array.length - 1; i > 0; i--) {
|
||||
var j = Math.floor(Math.random() * (i + 1));
|
||||
@@ -5,4 +9,4 @@ export function shuffleArray(array: any[]) {
|
||||
array[i] = array[j];
|
||||
array[j] = temp;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
export function mkstring (length:number ) {
|
||||
var result = '';
|
||||
var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
|
||||
var charactersLength = characters.length;
|
||||
for ( var i = 0; i < length; i++ ) {
|
||||
result += characters.charAt(Math.floor(Math.random() * charactersLength));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
429
src/vault.ts
429
src/vault.ts
@@ -1,184 +1,285 @@
|
||||
/**
|
||||
* Dennis Gunia (c) 2020
|
||||
*
|
||||
* SecureVault Class Implementation.
|
||||
* This Class provides a vault for storing encrypted and unencrypted data. Each encrypted element will be encrypted before storing it in an array.
|
||||
* Each element (encrypted or unencrypted) ist stored in an array with an unique identifier.
|
||||
* Safes can be stored and loaded. Unencrypted data can be stored, retrieved and modified. Encrypted data can be stored and retrieved.
|
||||
* This class also implements an transaction function.
|
||||
*
|
||||
* @summary SecureVault Class Implementation
|
||||
* @author Dennis Gunia <info@dennisgunia.de>
|
||||
* @license Licensed under the Apache License, Version 2.0 (the "License").
|
||||
*
|
||||
* You may not use this file except in compliance with the License.
|
||||
* A copy of the License is located at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* or in the "license" file accompanying this file. This file is distributed
|
||||
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
|
||||
* express or implied. See the License for the specific language governing
|
||||
* permissions and limitations under the License.
|
||||
*/
|
||||
|
||||
import * as crypto from 'crypto'
|
||||
import * as uuid from 'uuid'
|
||||
import path from 'path';
|
||||
import * as fs from 'fs'
|
||||
import { generateKeyPair } from 'crypto';
|
||||
import { Console } from 'console';
|
||||
|
||||
const vaultVersion = 'v1.2'
|
||||
/**
|
||||
* Namespace containing the code for the SecureVault.
|
||||
*/
|
||||
export namespace SVault {
|
||||
/** vault version number. This variable will be added to the safe file and is used to chack compatibility. */
|
||||
const vaultVersion = 'v1.2'
|
||||
|
||||
export interface SecureVaultItem {
|
||||
u: string; // uuid
|
||||
d: string; // data
|
||||
k: string; // key
|
||||
iv: string; // init vector
|
||||
}
|
||||
|
||||
export interface StorageItem {
|
||||
u: string; // uuid
|
||||
d: string; // data
|
||||
t: string; // tag
|
||||
}
|
||||
|
||||
export interface secureVaultList {
|
||||
items: SecureVaultItem[];
|
||||
publicKey?: Buffer;
|
||||
privateKey?: Buffer;
|
||||
}
|
||||
|
||||
export class SecureVault {
|
||||
|
||||
safe: secureVaultList;
|
||||
privPath?: string;
|
||||
pubPath?: string;
|
||||
storage: StorageItem[];
|
||||
|
||||
constructor (publicKey: string, privateKey?: string) {
|
||||
this.storage = [];
|
||||
this.safe = {
|
||||
items: [],
|
||||
publicKey: publicKey ?fs.readFileSync(path.resolve(publicKey)): undefined,
|
||||
privateKey: privateKey ? fs.readFileSync(path.resolve(privateKey)): undefined
|
||||
};
|
||||
this.privPath = publicKey ? path.resolve(publicKey): undefined,
|
||||
this.pubPath = privateKey ? path.resolve(privateKey): undefined
|
||||
/** Interface for an vault item containing encrypted data */
|
||||
export interface SecureVaultItem {
|
||||
/** uuid */
|
||||
u: string;
|
||||
/** data */
|
||||
d: string;
|
||||
/** key */
|
||||
k: string;
|
||||
/** init vector */
|
||||
iv: string;
|
||||
}
|
||||
|
||||
async pushData(data: any): Promise<string>{
|
||||
// encrypt payload
|
||||
const txtData = JSON.stringify(data);
|
||||
const key = crypto.randomBytes(32);
|
||||
const iv = crypto.randomBytes(16);
|
||||
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(key), iv);
|
||||
let encrypted = cipher.update(txtData);
|
||||
encrypted = Buffer.concat([encrypted, cipher.final()]);
|
||||
// encrypt key
|
||||
var buffer = new Buffer(key);
|
||||
if (!this.safe.publicKey){
|
||||
throw new Error("Public Key not found");
|
||||
/** Interface for an vault item containing unencrypted data */
|
||||
export interface StorageItem {
|
||||
/** uuid */
|
||||
u: string;
|
||||
/** data */
|
||||
d: string;
|
||||
/** tag (can be used to find specific items) */
|
||||
t: string;
|
||||
}
|
||||
|
||||
/** Interface for secureVault Array */
|
||||
export interface secureVaultList {
|
||||
items: SecureVaultItem[]; /** Array of encrypted items */
|
||||
publicKey?: Buffer; /** Binary of public key */
|
||||
privateKey?: Buffer; /** Binary of private key */
|
||||
}
|
||||
|
||||
/** Class representing a SecureVault. */
|
||||
export class SecureVault {
|
||||
/** Safe object */
|
||||
safe: secureVaultList;
|
||||
/** Path to private key */
|
||||
privPath?: string;
|
||||
/** Path to public key */
|
||||
pubPath?: string;
|
||||
/** Array of unencrypted items */
|
||||
storage: StorageItem[];
|
||||
|
||||
/**
|
||||
* Create a SecureVault.
|
||||
* @param publicKey - Path to public key.
|
||||
* @param privateKey - Path to private key.
|
||||
*/
|
||||
constructor (publicKey?: string, privateKey?: string) {
|
||||
this.storage = [];
|
||||
this.safe = {
|
||||
items: [],
|
||||
publicKey: publicKey ?fs.readFileSync(path.resolve(publicKey)): undefined,
|
||||
privateKey: privateKey ? fs.readFileSync(path.resolve(privateKey)): undefined
|
||||
};
|
||||
this.privPath = publicKey ? path.resolve(publicKey): undefined,
|
||||
this.pubPath = privateKey ? path.resolve(privateKey): undefined
|
||||
}
|
||||
var asym_encrypted = crypto.publicEncrypt(this.safe.publicKey, buffer);
|
||||
const u = uuid.v4()
|
||||
|
||||
const item = {
|
||||
u,
|
||||
d: encrypted.toString('hex'),
|
||||
k: asym_encrypted.toString("base64"),
|
||||
iv: iv.toString('hex')
|
||||
}
|
||||
this.writeTransaction("push: " + JSON.stringify(item))
|
||||
this.safe.items.push(item)
|
||||
return u;
|
||||
}
|
||||
|
||||
writeTransaction(payload: string){
|
||||
fs.appendFileSync('vault.log', `${payload}\n`);
|
||||
}
|
||||
|
||||
async saveData(path: string): Promise<void>{
|
||||
fs.writeFileSync(path, JSON.stringify({
|
||||
version: vaultVersion,
|
||||
vault: this.safe.items,
|
||||
storage: this.storage
|
||||
}));
|
||||
}
|
||||
|
||||
async loadData(path: string): Promise<void>{
|
||||
const loaded = JSON.parse(fs.readFileSync(path, 'utf8'));
|
||||
switch (loaded.version){
|
||||
case 'v1.1':
|
||||
this.safe.items = loaded.vault;
|
||||
break;
|
||||
case 'v1.2':
|
||||
this.safe.items = loaded.vault;
|
||||
this.storage = loaded.storage;
|
||||
break;
|
||||
default:
|
||||
console.error(`Unknown or unsupported vault file version: ${loaded.version}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async decryptData(): Promise<void>{
|
||||
|
||||
this.safe.items.forEach(el => {
|
||||
// decrpyt key
|
||||
let buffer = new Buffer(el.k, "base64");
|
||||
if (!this.safe.privateKey){
|
||||
throw new Error("Private Key not found");
|
||||
/**
|
||||
* Encrypts and appends data to SecureVault.
|
||||
* Also writes data to transaction log using @function writeTransaction
|
||||
* @param data - Path to public key.
|
||||
* @return Returns the uuid of the added object as promise
|
||||
*/
|
||||
async pushData(data: any): Promise<string>{
|
||||
// encrypt payload
|
||||
const txtData = JSON.stringify(data);
|
||||
const key = crypto.randomBytes(32);
|
||||
const iv = crypto.randomBytes(16);
|
||||
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(key), iv);
|
||||
let encrypted = cipher.update(txtData);
|
||||
encrypted = Buffer.concat([encrypted, cipher.final()]);
|
||||
// encrypt key
|
||||
var buffer = new Buffer(key);
|
||||
if (!this.safe.publicKey){
|
||||
throw new Error("Public Key not found");
|
||||
}
|
||||
var key = crypto.privateDecrypt(this.safe.privateKey, buffer);
|
||||
// decrpyt payload
|
||||
let iv = Buffer.from(el.iv, 'hex');
|
||||
let encryptedText = Buffer.from(el.d, 'hex');
|
||||
let decipher = crypto.createDecipheriv('aes-256-cbc', key, iv);
|
||||
let decrypted = decipher.update(encryptedText);
|
||||
decrypted = Buffer.concat([decrypted, decipher.final()]);
|
||||
const obj = JSON.parse(decrypted.toString());
|
||||
console.log(obj);
|
||||
})
|
||||
}
|
||||
var asym_encrypted = crypto.publicEncrypt(this.safe.publicKey, buffer);
|
||||
const u = uuid.v4()
|
||||
|
||||
static genKey(publicKeyDir: string, privateKeyDir: string){
|
||||
generateKeyPair('rsa', {
|
||||
modulusLength: 4096,
|
||||
publicKeyEncoding: {
|
||||
type: 'pkcs1',
|
||||
format: 'pem'
|
||||
},
|
||||
privateKeyEncoding: {
|
||||
type: 'pkcs1',
|
||||
format: 'pem',
|
||||
const item = {
|
||||
u,
|
||||
d: encrypted.toString('hex'),
|
||||
k: asym_encrypted.toString("base64"),
|
||||
iv: iv.toString('hex')
|
||||
}
|
||||
}, (err, publicKey, privateKey) => {
|
||||
fs.writeFileSync(privateKeyDir, privateKey);
|
||||
fs.writeFileSync(publicKeyDir, publicKey);
|
||||
});
|
||||
}
|
||||
this.writeTransaction("push: " + JSON.stringify(item))
|
||||
this.safe.items.push(item)
|
||||
return u;
|
||||
}
|
||||
|
||||
pushStorage(tag:string, data: any){
|
||||
if (vaultVersion !== 'v1.2'){
|
||||
throw new Error(`Storage not supported in ${vaultVersion}`);
|
||||
}else{
|
||||
let objJsonStr = JSON.stringify(data);
|
||||
let objJsonB64 = Buffer.from(objJsonStr).toString("base64");
|
||||
this.storage.push({
|
||||
u: uuid.v4(),
|
||||
d: objJsonB64,
|
||||
t: tag
|
||||
/**
|
||||
* Writes data to the vault log file located at ./vault.log
|
||||
* @param payload - Text to append
|
||||
*/
|
||||
writeTransaction(payload: string){
|
||||
fs.appendFileSync('vault.log', `${payload}\n`);
|
||||
}
|
||||
|
||||
/**
|
||||
* Saves safe to file
|
||||
* @param path - Path to safefile.
|
||||
* @return Resolves promise after loaded
|
||||
*/
|
||||
async saveData(path: string): Promise<void>{
|
||||
fs.writeFileSync(path, JSON.stringify({
|
||||
version: vaultVersion,
|
||||
vault: this.safe.items,
|
||||
storage: this.storage
|
||||
}));
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads safe from file and check compatibility
|
||||
* @param path - Path to safefile.
|
||||
* @return Resolves promise after loaded
|
||||
*/
|
||||
async loadData(path: string): Promise<void>{
|
||||
const loaded = JSON.parse(fs.readFileSync(path, 'utf8'));
|
||||
switch (loaded.version){
|
||||
case 'v1.1':
|
||||
this.safe.items = loaded.vault;
|
||||
break;
|
||||
case 'v1.2':
|
||||
this.safe.items = loaded.vault;
|
||||
this.storage = loaded.storage;
|
||||
break;
|
||||
default:
|
||||
console.error(`Unknown or unsupported vault file version: ${loaded.version}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Decrypts safe data.
|
||||
* Requires specified and loaded private key.
|
||||
* Prints data to console.
|
||||
* @return Resolves promise after decrypted
|
||||
*/
|
||||
async decryptData(): Promise<void>{
|
||||
|
||||
this.safe.items.forEach(el => {
|
||||
// decrpyt key
|
||||
let buffer = new Buffer(el.k, "base64");
|
||||
if (!this.safe.privateKey){
|
||||
throw new Error("Private Key not found");
|
||||
}
|
||||
var key = crypto.privateDecrypt(this.safe.privateKey, buffer);
|
||||
// decrpyt payload
|
||||
let iv = Buffer.from(el.iv, 'hex');
|
||||
let encryptedText = Buffer.from(el.d, 'hex');
|
||||
let decipher = crypto.createDecipheriv('aes-256-cbc', key, iv);
|
||||
let decrypted = decipher.update(encryptedText);
|
||||
decrypted = Buffer.concat([decrypted, decipher.final()]);
|
||||
const obj = JSON.parse(decrypted.toString());
|
||||
console.log(obj);
|
||||
})
|
||||
}
|
||||
/**
|
||||
* Generates RSA keypair.
|
||||
* @param publicKey - Path to public key.
|
||||
* @param privateKey - Path to private key.
|
||||
*/
|
||||
static genKey(publicKeyDir: string, privateKeyDir: string){
|
||||
generateKeyPair('rsa', {
|
||||
modulusLength: 4096,
|
||||
publicKeyEncoding: {
|
||||
type: 'pkcs1',
|
||||
format: 'pem'
|
||||
},
|
||||
privateKeyEncoding: {
|
||||
type: 'pkcs1',
|
||||
format: 'pem',
|
||||
}
|
||||
}, (err, publicKey, privateKey) => {
|
||||
fs.writeFileSync(privateKeyDir, privateKey);
|
||||
fs.writeFileSync(publicKeyDir, publicKey);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
setStorage(suuid:string, data: any){
|
||||
if (vaultVersion !== 'v1.2'){
|
||||
throw new Error(`Storage not supported in ${vaultVersion}`);
|
||||
}else{
|
||||
let objJsonStr = JSON.stringify(data);
|
||||
let objJsonB64 = Buffer.from(objJsonStr,"utf8").toString("base64");
|
||||
this.storage.filter(el => el.u == suuid)[0].d = objJsonB64;
|
||||
/**
|
||||
* Appends unencrypted data to safe.
|
||||
* @param tag - Tag for item
|
||||
* @param data - Data to store.
|
||||
*/
|
||||
pushStorage(tag:string, data: any){
|
||||
if (vaultVersion !== 'v1.2'){
|
||||
throw new Error(`Storage not supported in ${vaultVersion}`);
|
||||
}else{
|
||||
let objJsonStr = JSON.stringify(data);
|
||||
let objJsonB64 = Buffer.from(objJsonStr).toString("base64");
|
||||
this.storage.push({
|
||||
u: uuid.v4(),
|
||||
d: objJsonB64,
|
||||
t: tag
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets unencrypted data for item specified by suuid.
|
||||
* @param suuid - UUID for item
|
||||
* @param data - Data to store.
|
||||
*/
|
||||
setStorage(suuid:string, data: any){
|
||||
if (vaultVersion !== 'v1.2'){
|
||||
throw new Error(`Storage not supported in ${vaultVersion}`);
|
||||
}else{
|
||||
let objJsonStr = JSON.stringify(data);
|
||||
let objJsonB64 = Buffer.from(objJsonStr,"utf8").toString("base64");
|
||||
this.storage.filter(el => el.u == suuid)[0].d = objJsonB64;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets unencrypted data of item specified by suuid.
|
||||
* @param suuid - UUID for item
|
||||
* @return Data from item.
|
||||
*/
|
||||
getStorage(suuid:string){
|
||||
if (vaultVersion !== 'v1.2'){
|
||||
throw new Error(`Storage not supported in ${vaultVersion}`);
|
||||
}else{
|
||||
const data = this.storage.filter(el => el.u == suuid)[0];
|
||||
let objJsonB64 = new Buffer(data.d, 'base64');
|
||||
return JSON.parse(objJsonB64.toString('utf8'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets list of UUIDs matching the tag.
|
||||
* @param tag - tag to search for
|
||||
* @return UUID from item.
|
||||
*/
|
||||
findStorage(tag:string){
|
||||
if (vaultVersion !== 'v1.2'){
|
||||
throw new Error(`Storage not supported in ${vaultVersion}`);
|
||||
}else{
|
||||
return this.storage.filter(el => el.t == tag);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears all encrypted items from safe.
|
||||
*/
|
||||
clearVault(){
|
||||
this.safe.items = [];
|
||||
}
|
||||
}
|
||||
|
||||
getStorage(suuid:string){
|
||||
if (vaultVersion !== 'v1.2'){
|
||||
throw new Error(`Storage not supported in ${vaultVersion}`);
|
||||
}else{
|
||||
const data = this.storage.filter(el => el.u == suuid)[0];
|
||||
let objJsonB64 = new Buffer(data.d, 'base64');
|
||||
return JSON.parse(objJsonB64.toString('utf8'));
|
||||
}
|
||||
}
|
||||
|
||||
findStorage(tag:string){
|
||||
if (vaultVersion !== 'v1.2'){
|
||||
throw new Error(`Storage not supported in ${vaultVersion}`);
|
||||
}else{
|
||||
return this.storage.filter(el => el.t == tag);
|
||||
}
|
||||
}
|
||||
|
||||
clearVault(){
|
||||
this.safe.items = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
4
typedoc.json
Normal file
4
typedoc.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"mode": "file",
|
||||
"out": "docs"
|
||||
}
|
||||
Reference in New Issue
Block a user