UNPKG

@dotenvx/dotenvx-pro

Version:
11 lines (7 loc) 264 B
const { decrypt } = require('eciesjs') function decryptValue (value, privateKey) { const secret = Buffer.from(privateKey, 'hex') const ciphertext = Buffer.from(value, 'base64') return decrypt(secret, ciphertext).toString() } module.exports = decryptValue