function encrypt(text){
    var cipher = crypto.createCipher(config.cryptoalgorithm,config.secret);
    var crypted = cipher.update(text,'utf8','hex');
    crypted += cipher.final('hex');
    return crypted;
}
//http://lollyrock.com/articles/nodejs-encryption/ - encrypt and dedcrypt method
lollyrock.com/articles/nodejs-encryption/ - encrypt and dedcrypt method
lollyrock . com / articles / nodejs - encryption / - encrypt and dedcrypt method
function encrypt(text){
    var cipher = crypto.createCipher(config.cryptoalgorithm,config.secret);
    var crypted = cipher.update(text,'utf8','hex');
    crypted += cipher.final('hex');
    return crypted;
}
function encrypt ( text ) { var cipher = crypto . createCipher ( config . cryptoalgorithm , config . secret ) ; var crypted = cipher . update ( text , 'utf8' , 'hex' ) ; crypted += cipher . final ( 'hex' ) ; return crypted ; }
http://lollyrock.com/articles/nodejs-encryption/ - encrypt and dedcrypt method
http : // lollyrock . com / articles / nodejs - encryption / - encrypt and dedcrypt method