SHA256 C# vs FIPS 180

R

Ravi Singh (UCSD)

Hello all

I am using the SHA 256 function call in C# using the input "jonny".
I get the output

0fae56d5786cade88b348cf55a9e4a217406ff5359e517cddf9fea2bb686ea6f

and I am expecting the output

7a29dc9b52b3e44eef25e0441853324c97489f5e626fc1aa97e4ede646b50a45
this is from the implementation as givin in the URL below
http://www.cr0.net:8040/code/crypto/sha256/
I am not sure why this discrepancy exists.

Thanks

Ravi Singh.
 
J

Joe Kaplan \(MVP - ADSI\)

A lot of times things go wrong because you passed in different binary
versions of the same string due to encoding mismatches. If you pass in the
same array of bytes to each function, do you get the same results? If so,
then you probably just need to be sure you are using the same binary string
encoding (UTF8, UTF16, ASCII, etc.).

Joe K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top