2024年5月30日发(作者:)

byte[] resultByteArray = ();

return byteArrayToHex(resultByteArray);

} catch (NoSuchAlgorithmException e) {

return null;

}

}

public static String byteArrayToHex(byte[] byteArray) {

char[] hexDigits = {'0','1','2','3','4','5','6','7','8','9', 'a','b','c','d','e','f' }

char[] resultCharArray =new char[ * 2];

int index = 0;

for (byte b : byteArray) {

resultCharArray[index++] = hexDigits[b>>> 4 & 0xf];

resultCharArray[index++] = hexDigits[b& 0xf];

}

return new String(resultCharArray);

}