.NET ContentInfo taking too long to process

心不动则不痛 提交于 2019-12-24 12:52:58

问题


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);

回答1:


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.



来源:https://stackoverflow.com/questions/2049451/net-contentinfo-taking-too-long-to-process

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!