安装jsencrypt库
npm install --save jsencrypt
页面中引入jsencrypt
import JSEncrypt from 'jsencrypt'
调用方法
var encrypt = new JSEncrypt();
encrypt.setPublicKey('公钥字符串');
let password= encrypt.encrypt('helloworld');
console.info(password);
codeit 2021-03-01 22:34 原文
安装jsencrypt库
npm install --save jsencrypt
页面中引入jsencrypt
import JSEncrypt from 'jsencrypt'
调用方法
var encrypt = new JSEncrypt();
encrypt.setPublicKey('公钥字符串');
let password= encrypt.encrypt('helloworld');
console.info(password);