first, im sorry for my bad English.
Im forced to use OpenSSL and im testing it now.
I have public key:
$key = "{key}";
$key = "-----BEGIN PUBLIC KEY-----
" . wordwrap($key, 64, "
", true) . "
-----END PUBLIC KEY-----";
When i use:
$secret = "test";
$test = openssl_public_encrypt($secret, $encrypted, $key);
... everything is ok, in $test is true - so encrypting is ok.
But now, i want decrypt it back, so i use:
$ok = openssl_public_decrypt($encrypted, $vys, $key);
...and on this place, the $ok variable contains false :( How it is possible?
Thanks very much to all!