encrypt-node-js

1.0.0 • Public • Published

Encrypt JS (encrypt-node-js)

Encrypt and Decrypt text with Encrypt JS.

Installation

Install Encrypt JS with Node JS Package Manager (NPM).

npm install encrypt-node-js

Usage

Below are two examples on how to use Encrypt JS.

Encrypt Text

const EncryptJS = require("encrypt-node-js")
try {
    const key = await EncryptJS.generateKey()
    const encrypted = await EncryptJS.encrypt(key, "{your_text}")
    console.log(encrypted)
} catch (error) {
    console.log(error)
}

Decrypt Text

const EncryptJS = require("encrypt-node-js")
try {
    const key = await EncryptJS.generateKey()
    const decrypted = await EncryptJS.decrypt(key, "{your_encrypted_text}")
    console.log(decrypted)
} catch (error) {
    console.log(error)
}

License

Encrypt JS is licensed with MIT.

/encrypt-node-js/

    Package Sidebar

    Install

    npm i encrypt-node-js

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    5.66 kB

    Total Files

    3

    Last publish

    Collaborators

    • zavier-coder