1.0.4 • Published 3 years ago

@entom/node-encrypt-decrypt v1.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

nodejs-encrypt-decrypt

Nodejs app - encrypt and decrypt data

Initiate module

npx @entom/node-encrypt-decrypt init

Example of usage - without static value of iv

require('dotenv').config();
const crypter = require('./crypter');

const value = crypter.encrypt('entom');
console.log('value', value);

const value1 = crypter.encrypt('entom');
console.log('value-1', value1);

Example of usage - with static value of iv

require('dotenv').config();
const crypter = require('./crypter');
const staticIv = crypter.generateRandomKey();

const value = crypter.encrypt('entom', staticIv);
console.log('value', value);

const value1 = crypter.encrypt('entom', staticIv);
console.log('value-1', value1);
console.log('value-1 decrypted', crypter.decrypt(value1, staticIv));
1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago