vue achieve rsa encryption, digital signatures, md5 encryption

vue achieve rsa encryption, digital signatures, md5 encryption

96 
Super cute little balls  
 0.7  2018.09.14 11:20 *  Words 238  Read 3855 comments 6

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

 

 
Figure II

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

Guess you like

Origin www.cnblogs.com/leigepython/p/10929401.html