x-encryptr
v1.0.0
Published
A helper to encrypt and decrypt a payload with a provided key
Downloads
3
Maintainers
Readme
X-Collect
A helper encryption package to quickly encrypt, decrypt, and generate keys on the fly.
Installation
Package Manager
NPN
Install x-encrypt using NPM
npm install x-encrypt
Include x-encrypt in your application
const XEncrypt = require('./index');
const { encrypt, decrypt, keygen } = XEncrypt;
let input = 'Hello, World!';
let key = keygen();
let encrypted = encrypt(key, input);
let decrypted = decrypt(key, encrypted);
Usage
encrypt()
let encrypted = encrypt(key, input);
decrypt()
let decrypted = decrypt(key, encryptedText);
keygen()
let key = keygen();