vue achieve rsa encryption, digital signatures, md5 encryption
A. Use jsencrypt be rsa encryption
Original link: Js parameter RSA encrypted transmission, jsencrypt.js use - CSDN blog
* (At a place not original, no conversion +, rsa base64 transcoded been done)
1. Installation depends npm install jsencrypt
2. Introduction of import in main.js {JSEncrypt} from 'jsencrypt'
3. Mount Global methods
4. Method
let data = this. $ getCode (this.password) so that the line interface is passed
II. Digitally signed using jsrsasign
Understanding Digital signature: digital signature ---- sha1withrsa - Jane books
Original link: Based vue framework rsa encryption jsrsasign of the front - Simple book
1. Installation depends npm install jsrsasign
2.main.js引入 import jsrsasign from 'jsrsasign'
3. Mount Global methods
4. Method
let data = this. $ getsign (this.password) so that the line interface is passed
III. Use md5 encryption
1. Installation depends npm install md5
2.main.js introduced import md5 from 'js-md5'
3.Vue.prototype $ md5 = md5.
4. Method
let data = this. $ md5 (this.password) so that the line interface is passed