提问人:Bird2 提问时间:11/17/2023 更新时间:11/17/2023 访问量:57
.NET 8 - 我的平台不支持 SHA3.NET 8 - SHA3 not supported on my platform
.NET 8 - SHA3 not supported on my platform
问:
我在 .NET 8 上创建了一个新项目来尝试所有新功能。其中之一是SHA3,但是,由于某些原因,我的平台不支持SHA3。我没有在任何虚拟机上运行它,我在 Windows 11 x64 处理器 AMD Ryzen 3 5300U 上运行。
当我尝试使用任何 SHA3 类或任何 Shake 算法类时,我会得到一个异常,告诉我我的平台不支持该操作。我可以在不需要其他一些外部库的情况下以某种方式修复它吗?
using System.Security.Cryptography;
var hash = SHA3_256.HashData("Example data to hash"u8);
Unhandled exception. System.PlatformNotSupportedException: Operation is not supported on this platform.
at System.Security.Cryptography.SHA3_256.TryHashData(ReadOnlySpan`1 source, Span`1 destination, Int32& bytesWritten)
at System.Security.Cryptography.SHA3_256.HashData(ReadOnlySpan`1 source, Span`1 destination)
at System.Security.Cryptography.SHA3_256.HashData(ReadOnlySpan`1 source)
at Program.<Main>$(String[] args) in C:\Users\admin\source\repos\Net8Test\Net8Test\Program.cs:line 3
谢谢。
答: 暂无答案
评论