package com.hupu.monitor.net;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

public class b {
private static MessageDigest a;

private static StringBuilder b;

static {
try {
a = MessageDigest.getInstance("MD5");
} catch (NoSuchAlgorithmException noSuchAlgorithmException) {}
b = new StringBuilder();
}

public static String a(String paramString) {
a.reset();
a.update(paramString.getBytes());
byte[] arrayOfByte = a.digest();
StringBuilder stringBuilder = b;
byte b1 = 0;
stringBuilder.setLength(0);
while (b1 < arrayOfByte.length) {
byte b2 = arrayOfByte[b1] & 0xFF;
if (b2 < 16)
b.append('0');
b.append(Integer.toHexString(b2));
b1++;
}
return b.toString();
}
}

相关文章:

  • 2022-01-16
  • 2022-12-23
  • 2022-12-23
  • 2021-04-15
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2022-02-07
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2021-09-12
相关资源
相似解决方案