Generates a personal Public/Private keypair combination.
public generateKey ( string $realname, string $email, string $passphrase, string $comment = '', integer $keylength = 1024, integer $expire = null, string $key_type = 'RSA', string $subkey_type = 'RSA' ) : array | ||
$realname | string | The name to use for the key. |
string | The email to use for the key. | |
$passphrase | string | The passphrase to use for the key. |
$comment | string | The comment to use for the key. |
$keylength | integer | The keylength to use for the key. |
$expire | integer | The expiration date (UNIX timestamp). No expiration if empty. |
$key_type | string | Key type (@since 2.2.0). |
$subkey_type | string | Subkey type (@since 2.2.0). |
return | array | An array consisting of the following keys/values: - private: (string) Private key. - public: (string) Public key. |