PuTTY

Extends\phpseclib3\Crypt\Common\Formats\Keys\PuTTY

PuTTY Formatted RSA Key Handler

author

Jim Wigginton terrafrost@php.net

package

Default

Methods

Generate a symmetric key for PuTTY v2 keys

generateV2Key(string $password,integer $length): string
static

Arguments

$password

string

$length

integer

Response

string

Generate a symmetric key for PuTTY v3 keys

generateV3Key(string $password,string $flavour,integer $memory,integer $passes,string $salt): array
static

Arguments

$password

string

$flavour

string

$memory

integer

$passes

integer

$salt

string

Response

array

Break a public or private key down into its constituent components

load(string $key,string $password): array
static

Arguments

$key

string

$password

string

Response

array

Convert a private key to the appropriate format.

savePrivateKey(\phpseclib3\Math\BigInteger $n,\phpseclib3\Math\BigInteger $e,\phpseclib3\Math\BigInteger $d,array $primes,array $exponents,array $coefficients,string $password = '',array $options = array()): string
static

Arguments

$primes

array

$exponents

array

$coefficients

array

$password

string

optional

$options

array

optional

Response

string

Convert a public key to the appropriate format

savePublicKey(\phpseclib3\Math\BigInteger $n,\phpseclib3\Math\BigInteger $e): string
static

Sets the default comment

setComment(string $comment)
static

Arguments

$comment

string

Sets the default version

setVersion(integer $version)
static

Arguments

$version

integer

Wrap a private key appropriately

wrapPrivateKey(string $public,string $private,string $type,string $password,array $options = array()): string
static

Arguments

$public

string

$private

string

$type

string

$password

string

$options

array

optional

Response

string

Wrap a public key appropriately

wrapPublicKey(string $key,string $type): string
static

This is basically the format described in RFC 4716 (https://tools.ietf.org/html/rfc4716)

Arguments

$key

string

$type

string

Response

string

Constants

Public Handler

PUBLIC_HANDLER
var

Properties

Algorithm Identifier

types :array
static
var

Type(s)

array

Default comment

comment :string
static
var

Type(s)

string

Default version

version :integer
static
var

Type(s)

integer