abstract class PuTTY extends PuTTY (View source)

PuTTY Formatted DSA Key Handler

Constants

PUBLIC_HANDLER

Public Handler

Properties

static protected array $types Algorithm Identifier

Methods

static 
setComment(string $comment)

Sets the default comment

from  PuTTY
static array
load(string $key, string $password = '')

Break a public or private key down into its constituent components

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

Wrap a private key appropriately

from  PuTTY
static string
wrapPublicKey(string $key, string $type)

Wrap a public key appropriately

from  PuTTY
static string
savePrivateKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y, BigInteger $x, string $password = false, array $options = [])

Convert a private key to the appropriate format.

static string
savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)

Convert a public key to the appropriate format

Details

static setComment(string $comment)

Sets the default comment

Parameters

string $comment

static array load(string $key, string $password = '')

Break a public or private key down into its constituent components

Parameters

string $key
string $password

Return Value

array

static protected string wrapPrivateKey(string $public, string $private, string $type, string $password, array $options = [])

Wrap a private key appropriately

Parameters

string $public
string $private
string $type
string $password
array $options optional

Return Value

string

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

Wrap a public key appropriately

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

Parameters

string $key
string $type

Return Value

string

static string savePrivateKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y, BigInteger $x, string $password = false, array $options = [])

Convert a private key to the appropriate format.

Parameters

BigInteger $p
BigInteger $q
BigInteger $g
BigInteger $y
BigInteger $x
string $password optional
array $options optional

Return Value

string

static string savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)

Convert a public key to the appropriate format

Parameters

BigInteger $p
BigInteger $q
BigInteger $g
BigInteger $y

Return Value

string