Error occurred while decoding OAEP padding

后端 未结 8 1336
青春惊慌失措
青春惊慌失措 2020-12-06 09:45

While decrypting text using RSACryptoServiceProvider.Decrypt, I am getting the error:

Error occurred while decoding OAEP padding.

8条回答
  •  盖世英雄少女心
    2020-12-06 10:37

    FYI, you can still be (en/de)crypting in the right key sequence (encr:pub key, decr:priv key) - i.e. can still get this error decrypting with a private key - it just may be the wrong private key (i.e. from another cert/key pair), not the one paired w/ the pub key with which u encrypted initially. If u turn off OAEP padding and get a "bad data" exception, that's another indication.

提交回复
热议问题