【问题标题】:.NET ContentInfo taking too long to process.NET ContentInfo 处理时间过长
【发布时间】: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

标签: c# .net security


【解决方案1】:

在我的情况下 - 我发现了问题,在调试会话期间,在 VS 调试器之外只花费了太长时间,操作以正常可接受的速度执行。

【讨论】:

    猜你喜欢
    • 2018-03-15
    • 1970-01-01
    • 2015-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-10-17
    • 2019-04-24
    相关资源
    最近更新 更多