React中使用jsencrypt进行RSA加密
生活随笔
收集整理的這篇文章主要介紹了
React中使用jsencrypt进行RSA加密
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
安裝jsencrypt庫
npm install --save jsencrypt
頁面中引入jsencrypt
import JSEncrypt from 'jsencrypt'
調用方法
var encrypt = new JSEncrypt();
encrypt.setPublicKey('公鑰字符串');
let password= encrypt.encrypt('helloworld');
console.info(password);
總結
以上是生活随笔為你收集整理的React中使用jsencrypt进行RSA加密的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: error: gnu/stubs-32.
- 下一篇: 【转】selector函数指针回调机制