Created
November 23, 2011 14:22
-
-
Save gipi/1388784 to your computer and use it in GitHub Desktop.
Convert byte array to an hex String
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte[] messageDigest = algorithm(); | |
StringBuffer hexString = new StringBuffer(); | |
for (int i=0;i<messageDigest.length;i++) { | |
hexString.append(Integer.toHexString(0xFF & messageDigest[i])); | |
} | |
return hexString.toString(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment