.NET Core 中是否存在 System.Security.Cryptography.Pkcs.SignedCms 类的替代方案?还是我必须像在 WinRT 案例中那样深入研究 BouncyCastle?WinRT 中是否有 SignedCMS 的替代方案?
小智 5
仅供参考,以防有帮助。似乎可以通过此NUGET包提供对 SignedCms 和 S/MIME 的其他基本 .NET 类的支持:
System.Security.Cryptography.Pkcs
Run Code Online (Sandbox Code Playgroud)
即,在我将此NUGET包添加到我的 Visual Studio 2017 (VS2017) .NET Core 项目之前,我收到了以下编译错误:
Severity Code Description Project File Line Suppression State
Error CS0246 The type or namespace name 'CmsRecipientCollection' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246 The type or namespace name 'X509IssuerSerial' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246 The type or namespace name 'EnvelopedCms' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246 The type or namespace name 'SignedCms' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246 The type or namespace name 'SignerInfoCollection' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246 The type or namespace name 'ContentInfo' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246 The type or namespace name 'CmsRecipient' could not be found (are you missing a using directive or an assembly reference?)
Error CS0246 The type or namespace name 'RecipientInfo' could not be found (are you missing a using directive or an assembly reference?)
Error CS0103 The name 'SubjectIdentifierType' does not exist in the current context
Error CS0246 The type or namespace name 'SignerInfo' could not be found (are you missing a using directive or an assembly reference?)
Error CS1579 foreach statement cannot operate on variables of type 'SignerInfoCollection' because 'SignerInfoCollection' does not contain a public instance definition for 'GetEnumerator'
Error CS0246 The type or namespace name 'CmsSigner' could not be found (are you missing a using directive or an assembly reference?)
Run Code Online (Sandbox Code Playgroud)
添加NUGET包后,就可以编译成功了。
不,目前 .NET Core 中没有与 SignedCms 等效的工具。
非常欢迎您在https://github.com/dotnet/corefx/issues上创建一个问题,以表明这是您希望引入的类型。
| 归档时间: |
|
| 查看次数: |
2262 次 |
| 最近记录: |