Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > SHA256 C# vs FIPS 180

Reply
Thread Tools

SHA256 C# vs FIPS 180

 
 
Ravi Singh (UCSD)
Guest
Posts: n/a
 
      01-26-2005
Hello all

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

0fae56d5786cade88b348cf55a9e4a217406ff5359e517cddf 9fea2bb686ea6f

and I am expecting the output

7a29dc9b52b3e44eef25e0441853324c97489f5e626fc1aa97 e4ede646b50a45
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.

 
Reply With Quote
 
 
 
 
Joe Kaplan \(MVP - ADSI\)
Guest
Posts: n/a
 
      01-27-2005
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)" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hello all
>
> I am using the SHA 256 function call in C# using the input "jonny".
> I get the output
>
> 0fae56d5786cade88b348cf55a9e4a217406ff5359e517cddf 9fea2bb686ea6f
>
> and I am expecting the output
>
> 7a29dc9b52b3e44eef25e0441853324c97489f5e626fc1aa97 e4ede646b50a45
> 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.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need some help confirming transactions using sha256 kryptox.exchange@gmail.com Python 3 01-31-2013 06:44 PM
sha256 Himanshu Bharti C++ 2 02-27-2012 07:48 AM
Unsupported digest algorithm (sha256). yf kuanfai Ruby 9 01-27-2011 04:00 AM
using methods base64 module in conjunction with Crypto.Hash.SHA256 mirandacascade@yahoo.com Python 1 12-20-2006 08:53 PM
Asp.net SHA256 problem atakan ASP .Net Security 1 11-05-2003 01:38 PM



Advertisments