Documentation

PuTTY
in package

AbstractYes

PuTTY Formatted Key Handler

Tags
author

Jim Wigginton terrafrost@php.net

access

public

Table of Contents

Properties

$comment  : string
Default comment

Methods

load()  : array<string|int, mixed>
Break a public or private key down into its constituent components
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

Properties

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