Re: SHA256 C# vs FIPS 180

From: Joe Kaplan \(MVP - ADSI\) (joseph.e.kaplan_at_removethis.accenture.com)
Date: 01/27/05


Date: Wed, 26 Jan 2005 20:31:22 -0600

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.

"Ravi Singh (UCSD)" <ravisingh11@gmail.com> wrote in message
news:1106769539.235659.237000@z14g2000cwz.googlegroups.com...
> 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.
>