CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: SHA256.Create

  1. #1
    Join Date
    Oct 1999
    Location
    Belgium
    Posts
    440

    Question SHA256.Create

    Experimenting with the SHA256 class and now struggling with the Create method overload that takes the hashname as a parameter
    Code:
    SHA256 alg1 = SHA256.Create(); // returns a default SHA256Managed instance
    SHA256 alg2 = new SHA256Cng(); // returns a SHA256Cng instance
    SHA256 alg3 = SHA256.Create("SHA256Cng"); //always returns null
    Guess I'm not passing a correct string !?!?
    Any suggestions ?

  2. #2
    Join Date
    Jan 2014
    Location
    Germany
    Posts
    1

    Re: SHA256.Create

    According to MSDN, you can't get SHA256Cng with the String Create Method:
    http://msdn.microsoft.com/library/we...v=vs.110).aspx

    It doesn't list any additional valid parameters for the SHA256 class.

  3. #3
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: SHA256.Create

    Have a look into the ComputeHash method as well

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured