V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
mugglezzz
V2EX  ›  C#

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

  •  
  •   mugglezzz · Sep 1, 2018 · 3944 views
    This topic created in 2802 days ago, the information mentioned may be changed or developed.
    如题,我在用 RSA 分段解密的时候,RSACryptoServiceProvider.Decrypt ( byte[],false )这里报出了“存储空间不足,无法完成此操作”的错误,请问大家有解决办法吗。
    byte[]的长度只有 128,电脑 C 盘内存什么的都正常
    C#里面还有啥别的可能会出现这个错误 。。。
    2 replies    2018-11-01 10:45:17 +08:00
    thereisnoif
        1
    thereisnoif  
       Sep 25, 2018
    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  
       Nov 1, 2018
    可能你用了 any cpu,切换到 64 位编译吧,但是也不对,按理说应该是 oom 的异常。试着去排除吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2506 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 04:33 · PVG 12:33 · LAX 21:33 · JFK 00:33
    ♥ Do have faith in what you're doing.