SHA256 C# vs FIPS 180

Discussion in 'ASP .Net Security' started by Ravi Singh (UCSD), Jan 26, 2005.

  1. 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.
    Ravi Singh (UCSD), Jan 26, 2005
    #1
    1. Advertising

  2. 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)" <> wrote in message
    news:...
    > 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.
    >
    Joe Kaplan \(MVP - ADSI\), Jan 27, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    1
    Views:
    5,941
    Ken Cox [Microsoft MVP]
    Jun 27, 2006
  2. Replies:
    1
    Views:
    412
    Klaas
    Dec 20, 2006
  3. George
    Replies:
    1
    Views:
    859
  4. APA
    Replies:
    0
    Views:
    608
  5. atakan

    Asp.net SHA256 problem

    atakan, Nov 4, 2003, in forum: ASP .Net Security
    Replies:
    1
    Views:
    208
    atakan
    Nov 5, 2003
Loading...

Share This Page