Nik*_*tov 8 .net-core asp.net-core
我正在使用新版本的ASP.NET MVC 6(ASP.NET 5).如果我面向.NET框架CoreCLR(ASP.NET核心)的代码不会编译,因为我使用MD5CryptoServiceProvider的System.Security.Cryptography.您能否建议使用CoreCLR框架编译的任何替代方案?
Vic*_*aci 12
MD5.Create()从包中使用.
System.Security.Cryptography.Hashing.AlgorithmsSystem.Security.Cryptography.Algorithms.
目前更新
System.Security.Cryptography.Hashing.Algorithms已标记为过时.
小智 6
更新Victor Hurdugaci的回答:使用包System.Security.Cryptography.Algorithms.
System.Security.Cryptography.Hashing.Algorithms 目前已经过时了.
对于增量散列,在System.Security.Cryptography:
using (IncrementalHash hasher = IncrementalHash.CreateHash(HashAlgorithmName.MD5))
{
//hash loop
hasher.AppendData(data);
hasher.AppendData(data);
hasher.AppendData(data);
byte[] hash = hasher.GetHashAndReset();
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3729 次 |
| 最近记录: |