UNPKG

@liuhlightning/wx-pay

Version:
12 lines 419 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.encrypto = encrypto; const crypto_1 = require("crypto"); function encrypto(message) { const c = (0, crypto_1.publicEncrypt)({ key: this.wxPayPublicKey, padding: crypto_1.constants.RSA_PKCS1_OAEP_PADDING, }, Buffer.from(message, "utf-8")); return c.toString("base64"); } //# sourceMappingURL=encrypto.js.map