I am computing hash in my .net and Java application.But I got a problem when they gave me result because both are giving different results.While searching about this problem, I found these questions
question 1 and question 2 so applied there according tho their answers but unfortunately i didn't get success.I also tried UTF-8 and UTF-16LE but result was again not same.
Now I am stuck and want to know why it is happening and How can I solve this
My code snippet is given below
.Net
byte[] buffer2 = new SHA1CryptoServiceProvider().ComputeHash(bytes);
Java
MessageDigest sha1 = MessageDigest.getInstance("SHA1");
byte[] buffer2 = sha1.digest(bytes);
Any help would be greatly appreciated.
bytesin both cases?