JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 460
  • Score
    100M100P100Q93200F
  • License LGPL-3.0+

PGP, NaCl, and PBKDF2 in node.js and the browser (hashing, random, encryption, decryption, signatures, conversions), used by TogaTech.org

Package Exports

  • tenvoy
  • tenvoy/node/tenvoy.js
  • tenvoy/node/tenvoy.min.js
  • tenvoy/tenvoy.js
  • tenvoy/tenvoy.min.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tenvoy) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

TogaTech Logo

tEnvoy

Version Version Monthly Downloads

PGP, NaCl, and PBKDF2 in node.js and the browser (hashing, random, encryption, decryption, signatures, conversions), used by TogaTech.org

Imports

Browser Import

For the browser, only ./tenvoy.js or ./tenvoy.min.js is required and has all dependencies bundled inside the single file. We recommend including ./tenvoy.min.js.map in the same directory as ./tenvoy.min.js, which allows a browser to reconstruct the original unminified file in the debugger.

<script type="text/javascript" src="./tenvoy.min.js"></script>
<script>
  const envoy = new tEnvoy();
</script>

Node.js NPM Import

tEnvoy is available through the NPM registry. To install tEnvoy, use the following command in the terminal:

npm install tenvoy

To install tEnvoy into an NPM project, use this command instead:

npm install tenvoy --save

Make sure to run the test cases to ensure that tEnvoy works properly:

npm test

To include tEnvoy in your code:

const { tEnvoy, tEnvoyPGPKey, tEnvoyNaClKey, tEnvoyNaClSigningKey } = require("tenvoy");
const envoy = new tEnvoy();

Node.js File Import

For node.js file import, the filetree must be kept as-is without modifications. The entire repository must be cloned and placed within a directory, and ./node/tenvoy.js or ./node/tenvoy.min.js must be used to import the program.

First, ensure that all dependencies have been installed:

npm install

Make sure to run the test cases to ensure that tEnvoy works properly:

npm test

To include tEnvoy in your code:

const { tEnvoy, tEnvoyPGPKey, tEnvoyNaClKey, tEnvoyNaClSigningKey } = require("./node/tenvoy.min.js");
const envoy = new tEnvoy();

Minify

If you would like to minify the code yourself instead of using the provided tenvoy.min.js (and optional tenvoy.min.js.map), you can use UglifyJS 3 to minifiy the code yourself.

To install UglifyJS 3 as a command line app through NPM, run npm install uglify-js -g.

After UglifyJS 3 has been installed, you can run the following command in your terminal:

uglifyjs tenvoy.js -o tenvoy.min.js -c -m --source-map "filename='tenvoy.min.js.map',url='tenvoy.min.js.map'"