Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternatives of MD5CryptoServiceProvider in CoreCLR (ASP.NET 5 Core)

I am using the new version of ASP.NET MVC 6 (ASP.NET 5). If I target .NET CoreCLR framework (ASP.NET Core) the code doesn't compile because I am using MD5CryptoServiceProvider from System.Security.Cryptography. Can you suggest any alternatives that compile with the CoreCLR framework?

like image 422
Nikolay Kostov Avatar asked Nov 30 '14 17:11

Nikolay Kostov


2 Answers

Use MD5.Create() from the package System.Security.Cryptography.Hashing.Algorithms. System.Security.Cryptography.Algorithms.

Update System.Security.Cryptography.Hashing.Algorithms is marked obsolete at the moment.

like image 150
Victor Hurdugaci Avatar answered Oct 08 '22 23:10

Victor Hurdugaci


Update to Victor Hurdugaci's answer: use package System.Security.Cryptography.Algorithms.

System.Security.Cryptography.Hashing.Algorithms is marked obsolete at the moment.

hint

like image 27
Denis Avatar answered Oct 09 '22 01:10

Denis