【发布时间】:2010-01-12 14:06:32
【问题描述】:
以下使用 ContentInfo(System.Security.Cryptography.Pkcs.ContentInfo) 的代码确实需要很长时间才能执行。
有什么办法可以加快速度吗?
byte[] fileContents = File.ReadAllBytes(fileName );
var contentInfo = new ContentInfo(fileContents);
var signedCms = new SignedCms(contentInfo);
signedCms.Decode(fileContents);
signedCms.RemoveSignature(0);
【问题讨论】:
-
如果它挂起你的应用程序,你应该把它放在另一个线程中。我不确定如何加快实际功能...
-
必须将其保留在执行线程中,因为它处于高容量循环中
-
@JL:我以为你知道
ContentInfo与 C# 无关——它来自 .NET