各位大神, c# RSA 解密 报存储空间不足,无法完成此操作

2018-09-01 15:23:25 +08:00
 mugglezzz
如题,我在用 RSA 分段解密的时候,RSACryptoServiceProvider.Decrypt ( byte[],false )这里报出了“存储空间不足,无法完成此操作”的错误,请问大家有解决办法吗。
byte[]的长度只有 128,电脑 C 盘内存什么的都正常
C#里面还有啥别的可能会出现这个错误 。。。
2927 次点击
所在节点    C#
2 条回复
thereisnoif
2018-09-25 20:17:14 +08:00
https://docs.microsoft.com/en-us/dotnet/api/system.security.cryptography.rsacryptoserviceprovider.decrypt?view=netframework-4.7.2#System_Security_Cryptography_RSACryptoServiceProvider_Decrypt_System_Byte___System_Boolean_

The key does not match the encrypted data. However, the exception wording may not be accurate. For example, it may say "Not enough storage is available to process this command"
ygy7170229
2018-11-01 10:45:17 +08:00
可能你用了 any cpu,切换到 64 位编译吧,但是也不对,按理说应该是 oom 的异常。试着去排除吧

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/485191

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX