代码之家  ›  专栏  ›  技术社区  ›  JL. Hans Passant

.NET ContentInfo处理时间太长

  •  1
  • JL. Hans Passant  · 技术社区  · 15 年前

    使用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);
    
    1 回复  |  直到 15 年前
        1
  •  0
  •   JL. Hans Passant    15 年前

    在我的情况下——我发现了这个问题,只是在调试会话期间花费了太长的时间,在vs调试程序之外,操作以正常的可接受的速度执行。