【fix sonar】PasswordUtil文件

This commit is contained in:
梁琦涛
2023-03-09 12:04:40 +08:00
parent 9b1feca54a
commit 6f2e683af2
@@ -1,5 +1,6 @@
package com.jero.common.util;
import java.nio.charset.StandardCharsets;
import java.security.Key;
import java.security.SecureRandom;
import javax.crypto.Cipher;
@@ -93,7 +94,7 @@ public class PasswordUtil {
cipher.init(Cipher.ENCRYPT_MODE, key, parameterSpec);
//update-begin-author:sccott date:20180815 for:中文作为用户名时,加密的密码windows和linux会得到不同的结果 gitee/issues/IZUD7
encipheredData = cipher.doFinal(plaintext.getBytes("utf-8"));
encipheredData = cipher.doFinal(plaintext.getBytes(StandardCharsets.UTF_8));
//update-end-author:sccott date:20180815 for:中文作为用户名时,加密的密码windows和linux会得到不同的结果 gitee/issues/IZUD7
} catch (Exception e) {
e.printStackTrace();