UNPKG

expresscheckout-nodejs

Version:

Juspay's official expresscheckout-nodejs sdk

15 lines 490 B
import JWS from './JWS.js'; import JWE from './JWE.js'; function jwtEncrypt(data, keyId, publicKey, privateKey) { var signed = JWS.sign(data, keyId, privateKey); return JWE.encrypt(JSON.stringify(signed), keyId, publicKey); } function jwtDecrypt(data, keyId, publicKey, privateKey) { var signed = JWE.decrypt(data, privateKey); return JWS.verify(signed, publicKey); } export default { jwtEncrypt: jwtEncrypt, jwtDecrypt: jwtDecrypt }; //# sourceMappingURL=JWT.js.map