Answer the question
In order to leave comments, you need to log in
How to get a public key from a stored private?
I wrote my own script for encrypting and decrypting messages.
$nKey = openssl_pkey_new();
openssl_pkey_export($nKey, $pKey);
$uKey = openssl_pkey_get_details($nKey);
$uKey = $uKey['key'];
$data = 'Привет игорь!';
openssl_public_encrypt($data, $nData, $uKey);
echo base64_encode($nData) . "<br>";
openssl_private_decrypt($nData,$dData, $pKey);
echo $dData . "<br>";
Answer the question
In order to leave comments, you need to log in
How can I create new publics based on the stored private key?
I don’t know how in php, but everything is simple in the console
https://stackoverflow.com/a/5246045/1016033
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question