本文共--字 阅读约--分钟 | 浏览: -- Last Updated: 2021-07-03
使用:
<script src="assets/lib/jsencrypt.min.js"></script>
function rsaEncrypto(str) {
const encrypt = new JSEncrypt();
encrypt.setPublicKey(PUBLIC_KEY);
const msg = encrypt.encrypt(str);
return msg;
};
const params = {
password: this.rsaEncrypto(this.entity.password)
};