Skip to content

Instantly share code, notes, and snippets.

View sagivo's full-sized avatar
👨‍💻
coding

Sagiv Ofek sagivo

👨‍💻
coding
View GitHub Profile
function encrypt(text){
var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq')
var crypted = cipher.update(text,'utf8','hex')
crypted += cipher.final('hex');
return crypted;
}
function decrypt(text){
var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq')
var dec = decipher.update(text,'hex','utf8')