mugglezzz
V2EX  ›  C#

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

  •  
  •   mugglezzz · Sep 1, 2018 · 4430 views
    This topic created in 2989 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
    thereisnoif
    Sep 25, 2018
    1
    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
    ygy7170229
    Nov 1, 2018
    2
    可能你用了 any cpu,切换到 64 位编译吧,但是也不对,按理说应该是 oom 的异常。试着去排除吧
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1903 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 08:50 · PVG 16:50 · LAX 00:50 · JFK 03:50
    ♥ Do have faith in what you're doing.