Documentation

PuTTY extends PuTTY
in package

AbstractYes

PuTTY Formatted DSA Key Handler

Tags
author

Jim Wigginton terrafrost@php.net

access

public

Table of Contents

Constants

PUBLIC_HANDLER  = 'phpseclib3\Crypt\DSA\Formats\Keys\OpenSSH'
Public Handler

Properties

$types  : array<string|int, mixed>
Algorithm Identifier
$comment  : string
Default comment

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\DSA\Formats\Keys\OpenSSH'
Tags
access

private

Properties

$types

Algorithm Identifier

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

private

$comment

Default comment

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

private

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>

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 $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
access

private

Return values
string

wrapPublicKey()

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
access

private

Return values
string

generateSymmetricKey()

Generate a symmetric key for PuTTY keys

private static generateSymmetricKey(string $password, int $length) : string
Parameters
$password : string
$length : int
Tags
access

public

Return values
string

        
On this page

Search results