parent
9f147ed229
commit
ad09521250
src/main/java/com/dispose
|
@ -647,7 +647,9 @@ public class DpTechBypassAbilityImpl extends DpTechAbilityImpl {
|
|||
|
||||
String tsName = objectPrefix + "_" + disposeIp;
|
||||
|
||||
if(tsName.length() >= 16) {
|
||||
int dpTechMaxNameLen = 16;
|
||||
|
||||
if(tsName.length() >= dpTechMaxNameLen) {
|
||||
try {
|
||||
tsName = objectPrefix + "_" + CryptoHelper.md5Encryption(disposeIp).substring(0, 14);
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
|
|
|
@ -83,7 +83,7 @@ public class CryptoHelper {
|
|||
public static String md5Encryption(String plaintext) throws NoSuchAlgorithmException {
|
||||
MessageDigest messageDigest = MessageDigest.getInstance("MD5");
|
||||
messageDigest.update(plaintext.getBytes(StandardCharsets.UTF_8));
|
||||
return new String(messageDigest.digest());
|
||||
return base64Encryption(messageDigest.digest());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue