Cryptsharp C# Visual Studio 2022 无定义

Cryptsharp C# Visual Studio 2022 no definition

我试过运行

string cryptedPassword = Crypter.MD5.Crypt(Passwort, new CrypterOptions()
         {
            {CrypterOption.Variant, MD5CrypterVariant.Apache}
         });

来自 cryptsharp documentation

可是我好像做不到运行。

Passwort 是随机的 5 个字符的字符串

我有这个代码:

using System; using CryptSharp;
using System.IO;
using System.Security.Cryptography;

但保持运行宁错误:

Crypter has no definition for MD5
MD5CrypterVariant not available

我错过了什么?

提前致谢

如果要使用MD5加密算法,我们需要安装以下NuGet包。 https://www.nuget.org/packages/CryptSharpOfficial/

这是我的代码:

如果仍然有错误,您可以尝试重新安装NuGet包。