Hi,

I am trying to encrypt a string on PHP using RSA which should then be
decrypted by Ruby on Rails. In PHP, I am using the following commands:

$fp = fopen(...);
$pKey = fread($fp, filesize(...));
openssl_public_encrypt($data, $enc, $pKey);
return base64_encode($enc);

On Ruby on Rails, I get the following error: "padding check failed"

I already tried all padding configurations possible in PHP without
success.

Has anyone managed to exchange RSA strings between PHP and Ruby?

Cheers,
joana

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to