MCPcopy Index your code
hub / github.com/nodejs/node / encrypt

Function encrypt

test/parallel/test-crypto-padding-aes256.js:37–41  ·  view source on GitHub ↗
(val, pad)

Source from the content-addressed store, hash-verified

35 '0123456789abcdef0123456789abcdef', 'hex');
36
37function encrypt(val, pad) {
38 const c = crypto.createCipheriv('aes256', key, iv);
39 c.setAutoPadding(pad);
40 return c.update(val, 'utf8', 'latin1') + c.final('latin1');
41}
42
43function decrypt(val, pad) {
44 const c = crypto.createDecipheriv('aes256', key, iv);

Callers 1

Calls 2

updateMethod · 0.65
finalMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…