PuTTY
extends PuTTY
in package
AbstractYes
PuTTY Formatted RSA Key Handler
Tags
Table of Contents
Constants
- PUBLIC_HANDLER = 'phpseclib3\Crypt\RSA\Formats\Keys\OpenSSH'
- Public Handler
Properties
Methods
- load() : array<string|int, mixed>
- Break a public or private key down into its constituent components
- savePrivateKey() : string
- Convert a private key to the appropriate format.
- savePublicKey() : string
- Convert a public key to the appropriate format
- setComment() : mixed
- Sets the default comment
- wrapPrivateKey() : string
- Wrap a private key appropriately
- wrapPublicKey() : string
- Wrap a public key appropriately
- generateSymmetricKey() : string
- Generate a symmetric key for PuTTY keys
Constants
PUBLIC_HANDLER
Public Handler
public
string
PUBLIC_HANDLER
= 'phpseclib3\Crypt\RSA\Formats\Keys\OpenSSH'
Tags
Properties
$types
Algorithm Identifier
protected
static array<string|int, mixed>
$types
= ['ssh-rsa']
Tags
$comment
Default comment
private
static string
$comment
= 'phpseclib-generated-key'
Tags
Methods
load()
Break a public or private key down into its constituent components
public
static load(string $key[, string $password = '' ]) : array<string|int, mixed>
Parameters
- $key : string
- $password : string = ''
-
optional
Tags
Return values
array<string|int, mixed>savePrivateKey()
Convert a private key to the appropriate format.
public
static savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array<string|int, mixed> $primes, array<string|int, mixed> $exponents, array<string|int, mixed> $coefficients[, string $password = '' ][, array<string|int, mixed> $options = [] ]) : string
Parameters
- $n : BigInteger
- $e : BigInteger
- $d : BigInteger
- $primes : array<string|int, mixed>
- $exponents : array<string|int, mixed>
- $coefficients : array<string|int, mixed>
- $password : string = ''
-
optional
- $options : array<string|int, mixed> = []
-
optional
Tags
Return values
stringsavePublicKey()
Convert a public key to the appropriate format
public
static savePublicKey(BigInteger $n, BigInteger $e) : string
Parameters
- $n : BigInteger
- $e : BigInteger
Tags
Return values
stringsetComment()
Sets the default comment
public
static setComment(string $comment) : mixed
Parameters
- $comment : string
Tags
wrapPrivateKey()
Wrap a private key appropriately
protected
static wrapPrivateKey(string $public, string $private, string $type, string $password[, array<string|int, mixed> $options = [] ]) : string
Parameters
- $public : string
- $private : string
- $type : string
- $password : string
- $options : array<string|int, mixed> = []
-
optional
Tags
Return values
stringwrapPublicKey()
Wrap a public key appropriately
protected
static wrapPublicKey(string $key, string $type) : string
This is basically the format described in RFC 4716 (https://tools.ietf.org/html/rfc4716)
Parameters
- $key : string
- $type : string
Tags
Return values
stringgenerateSymmetricKey()
Generate a symmetric key for PuTTY keys
private
static generateSymmetricKey(string $password, int $length) : string
Parameters
- $password : string
- $length : int