Gla*_*las 2 c# mono cryptography sha1 .net-3.5
我正在尝试将一些代码从 C# 移植到 Mono 以用于未来的 Linux 项目。
Mono 输出此错误:
A System.Security.Cryptography.CryptographyException was thrown; sha1 is an unsupported hash algorithm for RSA signing"
运行或调试此代码以进行 RSA 签名时:
byte[] bytesSing = rsa.SignHash(hashValue, "SHA1");
Run Code Online (Sandbox Code Playgroud)
我检查了 VS2010,参考文献说它必须是一个字符串,我将其作为“SHA1”传递。这在 Windows 下编译和运行,但不能在 Mono 下编译或运行。
这是 Mono 的源代码。