Last post Dec 14, 2017 12:29 PM by abhiquiet
Dec 14, 2017 08:52 AM|abhiquiet|LINK
I am trying to work in the .net core 2 application, and trying to generate the HashAlgorithm object with SHA512
The code is getting created without any errors, but at the runtime i am getting the error stating "Operation is not supported on this platform"
The code that i m trying is as under :
Console.WriteLine("Get String Value");
string TestStr = Console.ReadLine();
HashAlgorithm hash = HashAlgorithm.Create("SHA512");
Console.WriteLine("Hash Value for the input String is ");
Console.WriteLine( Convert.ToBase64String(hash.ComputeHash(ASCIIEncoding.ASCII.GetBytes( TestStr ))));
Kindly let me know what can be work around for the above code.
Dec 14, 2017 10:15 AM|PatriceSc|LINK
I see the same message but HashAlgorithm hash =System.Security.Cryptography.SHA512.Create(); works fine.
Use this for now and possibly investigate later if you want to understand why the previous approach doesn't work.
Dec 14, 2017 12:18 PM|Radomir|LINK
Some more discussion about this can be found here:
Dec 14, 2017 12:29 PM|abhiquiet|LINK
Thanks for the quick response.
It is working now.