OpenSSH
in package
AbstractYes
OpenSSH Formatted RSA Key Handler
Tags
Table of Contents
Properties
Methods
- load() : array<string|int, mixed>
- Break a public or private key down into its constituent components
- 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
$comment
Default comment
protected
static string
$comment
= 'phpseclib-generated-key'
Tags
Methods
load()
Break a public or private key down into its constituent components
public
static load(string $key[, string $password = '' ]) : array<string|int, mixed>
$type can be either ssh-dss or ssh-rsa
Parameters
- $key : string
- $password : string = ''
Tags
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
setComment()
Sets the default comment
public
static setComment(string $comment) : mixed
Parameters
- $comment : string
Tags
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
Return values
stringcheckType()
Checks to see if the type is valid
private
static checkType(string $candidate) : mixed
Parameters
- $candidate : string