Skip to content

Instantly share code, notes, and snippets.

@sagardere
Created May 22, 2018 16:35
Show Gist options
  • Save sagardere/c34bba122cc9610ecaadf4846bb76f37 to your computer and use it in GitHub Desktop.
Save sagardere/c34bba122cc9610ecaadf4846bb76f37 to your computer and use it in GitHub Desktop.
var Cryptr = require('cryptr'),
cryptr = new Cryptr('secretKey');
var encryptedString = cryptr.encrypt('sagar'),
decryptedString = cryptr.decrypt(encryptedString);
console.log(encryptedString); // 0ed11b7de924ff2a81260fb5d44a954c
console.log(decryptedString); // sagar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment