I'm trying to hash a url using Sha-256 but i'm having a few problems. i have converted the bytes into a string and when i log that string its showing up incorrect instead of a 32 character long se of rand characters its showing this:
04-18 11:46:00.427: V/myApp(797): �C�rE�������.mm"7�{���"��Q]m
Any help would be greatly appreciated
heres my code:
public void hash() throws NoSuchAlgorithmException, UnsupportedEncodingException{
MessageDigest md = MessageDigest.getInstance("SHA-256");
md.update(fixturesFeedURL.getBytes("UTF-8"));
byte[] digest = md.digest();
String strhash = new String(digest);
Log.v("myApp", strhash);
}