public static String byteToStr(byte[] byteArray){
String strDigest = "";
for (int i = 0; i < byteArray.length; i++) {
strDigest+=byteToHexStr(byteArray[i]);
}
return strDigest;
}
public static String byteToHexStr(byte mByte){
char[] Digit = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
char[] tmpArr = new char[2];
tmpArr[0]=Digit[(mByte>>>4)& 0X0F];
tmpArr[1]=Digit[mByte&0X0F];
String s = new String(tmpArr);
return s;
}
String strDigest = "";
for (int i = 0; i < byteArray.length; i++) {
strDigest+=byteToHexStr(byteArray[i]);
}
return strDigest;
}
public static String byteToHexStr(byte mByte){
char[] Digit = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
char[] tmpArr = new char[2];
tmpArr[0]=Digit[(mByte>>>4)& 0X0F];
tmpArr[1]=Digit[mByte&0X0F];
String s = new String(tmpArr);
return s;
}