1.0.0 • Published 4 years ago

cypher-diu v1.0.0

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

cypher-diu

cypher-diu - This is a package for encryption and decryption of data

Installation

"dependencies": {
  "cypher-diu": "1.0.2" // see the "releases" section
}

npm install cypher-diu

Requirements

const cypher = require('cypher-diu');

Encryptdata

  • To Encrypt a data with aesKey and ivKey
let data = "Abbeys",aesKey='hjdfrfghjhiufhjyt',ivKey='hfjgjdhfkwhfjsfs';

data = cypher.encrypt(data,aesKey,ivKey);
console.log(data); // c423f99515a72f7652abc0761f5386b1

Decryptdata

  • To Decrypt a data with aesKey and ivKey
let data = " c423f99515a72f7652abc0761f5386b1",aesKey='hjdfrfghjhiufhjyt',ivKey='hfjgjdhfkwhfjsfs';

data = cypher.decrypt(data,aesKey,ivKey);
console.log(data); //7485ijhdkllksjdjkjkddjkdj

Tests

Cli

npm install
npm test

Contributors