OpenSSL Функции
PHP Manual

openssl_pkey_new

(PHP 4 >= 4.2.0, PHP 5)

openssl_pkey_newGenerates a new private key

Описание

resource openssl_pkey_new ([ array $configargs ] )

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().

Забележка: За да работи правилно тази функция, трябва да имате валидно инсталиран openssl.cnf. Вижте бележките под раздела за инсталация за повече информация.

Параметри

configargs

You can finetune the key generation (such as specifying the number of bits) using configargs . See openssl_csr_new() for more information about configargs .

Връщани стойности

Returns a resource identifier for the pkey on success, or FALSE on error.


OpenSSL Функции
PHP Manual