实现数据加密传输,成功调试登录接口

This commit is contained in:
2026-06-07 17:01:41 +08:00
parent aebd264d91
commit 895363305e
9 changed files with 596 additions and 56 deletions
+2 -2
View File
@@ -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");