resource openssl_pkey_new ([ array $configargs ] )
Generates a new private key
openssl_pkey_new() generates a new private and public key pair. The public component of the key can be obtained using openssl_pkey_get_public().
Getting the public key corresponding to a particular private key, through the methods provided for by OpenSSL, is a bit cumbersome. An easier way to do it is to use phpseclib, a pure PHP RSA implementation:
Doesn't require any extensions be installed. It'll use bcmath or gmp if they're available, for speed, but doesn't even require those.
0 Comment:
Post a Comment