Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static String hashToString(byte[] hash) {
- StringBuffer hexString = new StringBuffer();
- for (int i = 0; i < hash.length; i++)
- {
- String hex = Integer.toHexString(0xFF & hash[i]);
- if (hex.length() == 1)
- {
- hexString.append('0');
- }
- hexString.append(hex);
- }
- return hexString.toString();
- }
Add Comment
Please, Sign In to add comment