# wmt-encryption

> Typescript node module for data encryption

Latest version **1.0.6** (published 2019-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install wmt-encryption
pnpm add wmt-encryption
yarn add wmt-encryption
bun add wmt-encryption
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.6 |
| Published | 2019-02-28 |
| First published | 2019-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 338.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Joshua Clark WMTP |
| Maintainers | wmt-sdk |

## Links

- npm: https://www.npmjs.com/package/wmt-encryption
- Repository: https://bitbucket.org/wmtp/wmt-encryption
- Homepage: https://bitbucket.org/wmtp/wmt-encryption-module/src/master/
- npm.io page: https://npm.io/package/wmt-encryption

## Dependencies (5)

- [jest](https://npm.io/package/jest.md) ^23.6.0
- [ts-jest](https://npm.io/package/ts-jest.md) ^23.10.5
- [typedoc](https://npm.io/package/typedoc.md) ^0.14.2
- [@types/jest](https://npm.io/package/@types/jest.md) ^23.3.13
- [@types/node](https://npm.io/package/@types/node.md) ^10.12.18

## Recent versions

- 1.0.6 (latest) — 2019-02-28
- 1.0.5 — 2019-02-05
- 1.0.4 — 2019-01-29
- 1.0.3 — 2019-01-23
- 1.0.2 — 2019-01-23
- 1.0.1 — 2019-01-17
- 1.0.0 — 2019-01-17

## README

# wmt-encryption

The wmt-encryption module provides aes-256-gcm encryption for JavaScript applications.

## Setting up the module

- git clone git@bitbucket.org:wmtp/wmt-encryption.git
- cd wmt-encryption
- npm install

## Building the module

The module uses Typescript compiler (TSC) to compile the source code.
To build the project run the following command:

- npm run build

## Installing the module for testing

You can install the module into your own JavaScript project as a dependency.
After you clone the module you can install using the following command:

- npm install /absolute/path/to/wmt-encryption
- i.e. -> npm install /Users/wmt/Documents/projects/npm/wmt-encryption

## Installing the module from npm

Use the following command to install from npm:

- npm install wmt-encryption

## Importing the module

Once you have the module installed you can import exported functions into your code like so:

```javascript
import {generateKeyFromString, encrypt, decrypt} from "wmt-encryption";
```

## Using the module

Example of using the module:

```javascript
// import the module
import {generateKeyFromString, encrypt, decrypt} from "wmt-encryption";

// create something
let somePlainText = "some plain text";

// generate key from some pin
let key = generateKeyFromString("1234");

// encrypt data
let encryptedText = encrypt(somePlainText, key); // encryptedText: "6dd34283b31adfa7fd5ec507d72e33b9"

// decrypt data
let decryptedText = decrypt(encryptedText, key); // decryptedText: "some plain text"
```

## Testing

- Tests can be ran with the `npm test` command.
- Tests are ran using Jest - More information about getting started with Jest can be found [here](https://jestjs.io/docs/en/getting-started.html).

## Viewing API docs

Here you can find the API docs that detail all functions of this module:
https://wmtp.bitbucket.io/TypescriptModules/docs/wmt-encryption/docs

## Viewing the source code

https://bitbucket.org/wmtp/wmt-encryption

## Published module

Here is where the module is currently published:
https://www.npmjs.com/package/wmt-encryption

## License

This project is licensed under the MIT License.

---
_Source: https://npm.io/package/wmt-encryption · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
