MCPcopy Create free account
hub / github.com/cnodejs/nodeclub / encrypt

Function encrypt

controllers/sign.js:338–343  ·  view source on GitHub ↗
(str, secret)

Source from the content-addressed store, hash-verified

336}
337
338function encrypt(str, secret) {
339 var cipher = crypto.createCipher('aes192', secret);
340 var enc = cipher.update(str, 'utf8', 'hex');
341 enc += cipher.final('hex');
342 return enc;
343}
344
345function decrypt(str, secret) {
346 var decipher = crypto.createDecipher('aes192', secret);

Callers 1

gen_sessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected