For the records and because I hate finding messages with no answer:
this problem was caused by the transfer to the database. I suspect
some magic quotes or whatever to have altered the data. Therefore
decryption failed and caused this error.
Solution: use base64_encode($encrypted_data) before putting the data
into the db and base64_decode before decrypting.
ad******@hotmail.com (Alex) wrote in message news:<b6**************************@posting.google. com>...
Hi,
I have a weird problem using openssl_get_privatekey. I use this
function to decrypt some records from a database. The first two get
decrypted fine, but at the third function call, openssl_get_privatekey
returns false and the script stops outputting, with this error string:
error:0407106B:rsa routines:RSA_padding_check_PKCS1_type_2:block type
is not 02
I use PHP 4.2.3 with openssl 0.9.6e
Any ideas?
Alex