(val, pad)
| 41 | } |
| 42 | |
| 43 | function decrypt(val, pad) { |
| 44 | const c = crypto.createDecipheriv('aes256', key, iv); |
| 45 | c.setAutoPadding(pad); |
| 46 | return c.update(val, 'latin1', 'utf8') + c.final('utf8'); |
| 47 | } |
| 48 | |
| 49 | // echo 0123456789abcdef0123456789abcdef \ |
| 50 | // | openssl enc -e -aes256 -nopad -K <key> -iv <iv> \ |
no test coverage detected
searching dependent graphs…