Skip to content
Advertisement

Tag: sha512

MessageDigestMessage Digest returning different key after first digest

Here is how I initialize MessageDigest And here is how digest to get bytes for password which I later convert to string (no issue there) Now assume the password is “Password@1”. Here is the output first time (apologies for long text below) 115,83,48,-2,41,29,-99,71,-54,-53,-26,-67,-118,48,-75,77,13,100,42,70,-72,110,-85,23,-38,119,-110,-15,121,3,-25,114,-68,109,-108,94,-122,65,-62,10,-90,8,-125,114,-118,51,-51,89,127,55,37,83,-126,56,-31,-27,-49,-60,25,74,-80,-110,23,45 And here is output second time onwards. It remains same after this. -62,-50,45,-44,91,-86,16,90,85,53,101,-122,51,12,-82,52,-123,-101,-10,-28,-108,114,120,-96,84,-23,38,-75,78,67,36,-93,-88,-11,79,76,126,-34,-2,109,76,-31,-30,-86,-28,13,-91,-22,-65,-128,108,-47,15,19,95,60,-30,-123,-4,20,-64,21,-1,7 Can some one please

What is the equivalent of hashing Java code into C#?

I have a strange problem in getting equivalent hash code from C# code translated into Java. I don’t know, what MessageDigest update method do. It should only update the contents of digest and should compute hash after calling digest. Same thing I am doing in C# with SHAManaged512.ComputeHash(content). But I am not getting same hash code. Following is the Java

SHA-512 hashing with Android

I was wondering if I can SHA-512 hash a string on Android Studio without a salt. I’ve seen other questions, but they all involve the salt, but I want something like this: And TextBox will read c1527cd893c124773d811911970c8fe6e857d6df5dc9226bd8a160614c0cd963a4ddea2b94bb7d36021ef9d865d5cea294a82dd49a0bb269f51f6e7a57f79421; Answer The other questions you saw use salt so just don’t use salt like so: Based on this answer.

Advertisement