what if the decryption string using jsencrypt is too long and the decryption content is solved by Null?
address jsencrypt: https://github.com/travist/js.
website has found some but can not use many incomplete
to solve this problem.
import JSEncrypt from "jsencrypt";
var RSA = new JSEncrypt();
/*
* content (String)
* mode (String)
* */
static decrypt(content,mode="RSA"){
if(!content){
console.log("");
return "";
}
let res;
let key;
switch(mode){
case "RSA":
//
key = "XXX"
console.log("",content);
RSA.setPrivateKey(key);
res = RSA.decrypt(content);
console.log("res",res);//null
break;
}
return res;
}