OpenSSH

Extends\phpseclib3\Crypt\Common\Formats\Keys\OpenSSH

OpenSSH Formatted DSA Key Handler

author

Jim Wigginton terrafrost@php.net

package

Default

Methods

Checks to see if the type is valid

checkType(string $candidate)
static

Arguments

$candidate

string

Break a public or private key down into its constituent components

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

$type can be either ssh-dss or ssh-rsa

Arguments

$key

string

$password

string

Response

array

Convert a private key to the appropriate format.

savePrivateKey(\phpseclib3\Math\BigInteger $p,\phpseclib3\Math\BigInteger $q,\phpseclib3\Math\BigInteger $g,\phpseclib3\Math\BigInteger $y,\phpseclib3\Math\BigInteger $x,string $password = '',array $options = array()): string
static

Arguments

$password

string

optional

$options

array

optional

Response

string

Convert a public key to the appropriate format

savePublicKey(\phpseclib3\Math\BigInteger $p,\phpseclib3\Math\BigInteger $q,\phpseclib3\Math\BigInteger $g,\phpseclib3\Math\BigInteger $y,array $options = array()): string
static

Toggle between binary and printable keys

setBinaryOutput(boolean $enabled)
static

Printable keys are what are generated by default. These are the ones that go in $HOME/.ssh/authorized_key.

Arguments

$enabled

boolean

Sets the default comment

setComment(string $comment)
static

Arguments

$comment

string

Wrap a private key appropriately

wrapPrivateKey(string $publicKey,string $privateKey,string $password,array $options): string
static

Arguments

$publicKey

string

$privateKey

string

$password

string

$options

array

Response

string

Properties

Supported Key Types

types :array
static
var

Type(s)

array

Default comment

comment :string
static
var

Type(s)

string

Binary key flag

binary :boolean
static
var

Type(s)

boolean