Rust OpenSSL Private Key Decryption error

Hello Anyone.
I get this error while trying to decrypt a public key encrypted string in rust openssl.

Error: ErrorStack([Error { code: 33554591, library: "rsa routines", function: "RSA_padding_check_PKCS1_type_2", reason: "pkcs decoding error", file: "crypto/rsa/rsa_pk1.c", line: 269 }, Error { code: 33554546, library: "rsa routines", function: "rsa_ossl_private_decrypt", reason: "padding check failed", file: "crypto/rsa/rsa_ossl.c", line: 500 }])

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.