'use strict'; const JSEncrypt = require('jsencrypt'); function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; } const JSEncrypt__default = /*#__PURE__*/_interopDefaultCompat(JSEncrypt); const encrypt = (plaintext, publicKey) => { const encryptor = new JSEncrypt__default(); encryptor.setPublicKey(publicKey); return encryptor.encrypt(plaintext); }; const decrypt = (ciphertext, privateKey) => { const encryptor = new JSEncrypt__default(); encryptor.setPrivateKey(privateKey); return encryptor.decrypt(ciphertext); }; exports.decrypt = decrypt; exports.encrypt = encrypt;