C# equivalent to Java RSA/ECB/OAEPWithSHA-256AndMGF1Padding

后端 未结 2 1494
陌清茗
陌清茗 2021-01-13 18:54

I am trying to encrypt at string in Java and decrypt in C#. I tried with RSA/ECB/PKCS1PADDING first and it worked like a charm, but now I\'m trying to switch to OAEP padding

2条回答
  •  既然无缘
    2021-01-13 19:43

    It seems to be SHA-256 that's not working with C#. I changed the algorithm name to "RSA/ECB/OAEPWithSHA-1AndMGF1Padding", and it worked!

提交回复
热议问题