(val, pad)
| 35 | '0123456789abcdef0123456789abcdef', 'hex'); |
| 36 | |
| 37 | function 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 | |
| 43 | function decrypt(val, pad) { |
| 44 | const c = crypto.createDecipheriv('aes256', key, iv); |
no test coverage detected
searching dependent graphs…