Documentation

OpenSSH extends OpenSSH
in package

AbstractYes

OpenSSH Formatted DSA Key Handler

Tags
author

Jim Wigginton terrafrost@php.net

access

public

Table of Contents

Properties

$binary  : bool
Binary key flag
$comment  : string
Default comment
$types  : array<string|int, mixed>
Supported Key Types

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
setBinaryOutput()  : mixed
Toggle between binary and printable keys
setComment()  : mixed
Sets the default comment
wrapPrivateKey()  : string
Wrap a private key appropriately
checkType()  : mixed
Checks to see if the type is valid

Properties

$binary

Binary key flag

protected static bool $binary = false
Tags
access

private

$comment

Default comment

protected static string $comment = 'phpseclib-generated-key'
Tags
access

private

$types

Supported Key Types

protected static array<string|int, mixed> $types = ['ssh-dss']

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
access

public

Return values
array<string|int, mixed>

setBinaryOutput()

Toggle between binary and printable keys

public static setBinaryOutput(bool $enabled) : mixed

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

Parameters
$enabled : bool
Tags
access

public

setComment()

Sets the default comment

public static setComment(string $comment) : mixed
Parameters
$comment : string
Tags
access

public

wrapPrivateKey()

Wrap a private key appropriately

protected static wrapPrivateKey(string $publicKey, string $privateKey, string $password, array<string|int, mixed> $options) : string
Parameters
$publicKey : string
$privateKey : string
$password : string
$options : array<string|int, mixed>
Tags
access

public

Return values
string

checkType()

Checks to see if the type is valid

private static checkType(string $candidate) : mixed
Parameters
$candidate : string
Tags
access

private


        
On this page

Search results