itinance/react-native-sha256

Not getting same hash for the same input with .Net and this library

CabuxaMapache opened this issue · 1 comments

Hi, I'm generating a hash from a string and I'm getting different results in .Net and this library:

.Net:
"123456": "jZae727K08KaOmKSgOaGzww/XVqGr/PKEgIMkjrcbJI="
I get it this way: Convert.ToBase64String(SHA256.Create().ComputeHash(Encoding.UTF8.GetBytes("123456")));

react-native-sha256:
"123456": "8d969eef6ecad3c29a3a629280e686cf0c3f5d5a86aff3ca12020c923adc6c92"

As my experience, sha256 is a standard and must return same value...

This library returns the sha256 as a hexadecimal digest, not in Base64 encoded like your .Net-code does.