Tech Off Thread

5 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

SHA512 in visual studio 2008 and .net 3.5

Back to Forum: Tech Off
  • User profile image

    Hi all

    I am using visual studio 2008 and dot net 3.5. I am trying to encrypt a string, but when I use the SHA1 it works fine, but when I try the same with SHA256,SHA384,SHA512 . I am getting the following error

    the type or namespace name "SHA512" could not be found (are you missing a using directive or an assembly refrence ?)

    and similarly for the other SHA256 and SHA384. And when I type the SHA in the visual studio I am only getting the following things

    1. SHA1
    2. SHA1CryptoServiceProvider
    3. SHA1Managed

    and it doesn't list any of the other SHA256,SHA384,and SHA512. What am I missing here ? 


    I am using using System.Security.Cryptography;


    Varun Krishna. P

  • User profile image

    do you have the namespaces imported in your project ?

    do you have them in the project references dialog ?

  • User profile image

    @figuerres:It's in the mscorlib so there aren't much possibility for not having them imported.

    By comparing the documentation for these class... any chance you're developing for Compact Framework? In that case only SHA1 related classes are available.

    Recent Achievement unlocked: Code Avenger Tier 4/6: You see dead program. A lot!
    Last modified
  • User profile image


    Yes, I had imported the namespace using using System.Security.Cryptography; and also added the reference to my project.. Cheong is correct, for CF it only lists SHA1's.




    Varun Krishna. P

  • User profile image


    Yes,Cheong you are absolutely correct, for Compact Framework it only lists SHA1's. So I had cross checked it yesterday with WPF application and it lists all the SHA1's SHA256's, SHA384's and SHA512's.




    Varun Krishna. P

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.