Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // https://www.tools4noobs.com/online_tools/encrypt/
- var crypto = require('crypto'),
- algorithm = 'aes-128-cbc',
- password = '0123456789abcdef';
- // module.exports.encrypt=function(text){
- // var cipher = crypto.createCipher(algorithm,password)
- // var crypted = cipher.update(text,'utf8','hex')
- // crypted += cipher.final('hex');
- // return crypted;
- // }
- module.exports.decrypt=function(text){
- var decipher = crypto.createDecipher(algorithm,password)
- var dec = decipher.update(text,'hex','utf8')
- dec += decipher.final('utf8');
- return dec;
- }
- if(!module.parent){
- var text=module.exports.decrypt('8b25e846b6a2d52ad87f38f8134906c3')
- console.log(text)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement