.NET ContentInfo花费太长时间来处理 [英] .NET ContentInfo taking too long to process

查看:132
本文介绍了.NET ContentInfo花费太长时间来处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用ContentInfo(System.Security.Cryptography.Pkcs.ContentInfo)以下code是真的花费很长的时间来执行。

有什么我可以做,以加快步伐?

 字节[] fileContents = File.ReadAllBytes(文件名);
VAR contentInfo =新ContentInfo(fileContents);
VAR signedCms =新SignedCms(contentInfo);
signedCms.De code(fileContents);
signedCms.RemoveSignature(0);
 

解决方案

在我的情况 - 我想通了这个问题,它只是时间太长调试会话过程中,VS调试器之外,该工作在正常可接受的执行速度。

The following code using ContentInfo(System.Security.Cryptography.Pkcs.ContentInfo) is really taking a long time to execute.

Is there anything I can do to speed it up?

byte[] fileContents = File.ReadAllBytes(fileName );
var contentInfo = new ContentInfo(fileContents);
var signedCms = new SignedCms(contentInfo);
signedCms.Decode(fileContents);
signedCms.RemoveSignature(0);

解决方案

In my situation - I figured out the problem, it was only taking too long during a debug session, outside of the VS debugger, the operation performed at normal acceptable speeds.

这篇关于.NET ContentInfo花费太长时间来处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆