feat(login): #1300 Modify the comments to English

pull/1316/head
Serenity 2 years ago
parent e389c27440
commit 13c03cfd29

@ -37,9 +37,7 @@ const actions = {
return new Promise((resolve, reject) => {
let key = actions.genKey();
let encodePassword = actions.encrypt(password, key)
console.log("enpwd:", encodePassword)
key = key.split("").reverse().join("")
login({username: username.trim(), password: encodePassword, tag: key, rememberMe: 1})
.then((response) => {
const {data} = response;
@ -51,7 +49,7 @@ const actions = {
resolve();
})
.catch((error) => {
alert('登录失败');
// alert('登录失败');
reject(error);
});
});

@ -11,7 +11,7 @@ import java.security.GeneralSecurityException;
import java.util.Base64;
/**
* Aes
* AES encryption and decryption algorithm tool class
*
* @author <a href="mailto:SerenitySir@outlook.com">Serenity</a>
* @date 2023/5/21 14:37
@ -23,10 +23,10 @@ public class AESUtil {
private static final String AES_GCM_CIPHER = "AES/GCM/PKCS5Padding";
/**
*
* encrypt
*
* @param data
* @param key
* @param data Content that needs to be encrypted
* @param key Encrypt the password
* @return byte[]
*/
public static byte[] encrypt(byte[] data, byte[] key) throws GeneralSecurityException {
@ -42,10 +42,10 @@ public class AESUtil {
}
/**
*
* decrypt
*
* @param data
* @param key
* @param data The content to be decrypted
* @param key Decryption key
* @return byte[]
*/
public static byte[] decrypt(byte[] data, byte[] key) throws GeneralSecurityException{
@ -57,10 +57,10 @@ public class AESUtil {
}
/**
*
* encrypt
*
* @param data
* @param key
* @param data Content that needs to be encrypted
* @param key Encrypt the password
* @return String
*/
public static String encrypt(String data, String key) throws GeneralSecurityException {
@ -69,10 +69,10 @@ public class AESUtil {
}
/**
*
* decrypt
*
* @param data base64
* @param key
* @param data The content to be decrypted is a base64 string
* @param key Decryption key
* @return String
*/
public static String decrypt(String data, String key) throws GeneralSecurityException {
@ -82,9 +82,9 @@ public class AESUtil {
}
/**
*
* Generate a random string key
*
* @return
* @return The string key
*/
public static String generateRandomKey() {
return IdWorker.get32UUID().substring(0, 16);

Loading…
Cancel
Save