实现数据加密传输,成功调试登录接口
This commit is contained in:
+2
-2
@@ -21,7 +21,7 @@ export class JSEncrypt {
|
||||
* @returns Base64密文
|
||||
*/
|
||||
static encrypt(text : string) : string {
|
||||
if (!text) {
|
||||
if (text == "") {
|
||||
return "";
|
||||
}
|
||||
return rsaEncryptText(JSEncrypt.PUBLIC_KEY, text, "base64");
|
||||
@@ -34,7 +34,7 @@ export class JSEncrypt {
|
||||
* @returns 明文
|
||||
*/
|
||||
static decrypt(cipherText : string) : string {
|
||||
if (!cipherText) {
|
||||
if (cipherText=="") {
|
||||
return "";
|
||||
}
|
||||
return rsaDecryptText(JSEncrypt.PRIVATE_KEY, cipherText, "base64");
|
||||
|
||||
Reference in New Issue
Block a user