V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
mugglezzz
V2EX  ›  C#

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

  •  
  •   mugglezzz · 2018-09-01 15:23:25 +08:00 · 2911 次点击
    这是一个创建于 2056 天前的主题,其中的信息可能已经有所发展或是发生改变。
    如题,我在用 RSA 分段解密的时候,RSACryptoServiceProvider.Decrypt ( byte[],false )这里报出了“存储空间不足,无法完成此操作”的错误,请问大家有解决办法吗。
    byte[]的长度只有 128,电脑 C 盘内存什么的都正常
    C#里面还有啥别的可能会出现这个错误 。。。
    2 条回复    2018-11-01 10:45:17 +08:00
    thereisnoif
        1
    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
        2
    ygy7170229  
       2018-11-01 10:45:17 +08:00
    可能你用了 any cpu,切换到 64 位编译吧,但是也不对,按理说应该是 oom 的异常。试着去排除吧
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   995 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 19:45 · PVG 03:45 · LAX 12:45 · JFK 15:45
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.