• Stan Kulp-439977 (5/13/2014)


    I was able to change my existing code from MD5 to SHA256 just by using the editor to drill down into the System.Security.Cryptography library.

    using (var md5 = System.Security.Cryptography.SHA256.Create())

    Here is the hash that it generated:

    89-BB-31-71-BE-34-E2-23-2C-E3-26-AD-1B-09-B3-8D-70-96-F9-02-B6-DB-D7-23-1E-48-CD-11-3F-63-08-0F

    Thanks!

    You're welcome; you ended up with a 256 bit hash, which is the correct hash length.

    I'd suggest renaming "var md5" to "var SHA-256" if dashes or allowed, or "var SHA256" if not, to reduce confusion.