pssht  latest
SSH server library written in PHP
fpoirotte\Pssht\KeyLoader\Openssh Class Reference

Static Public Member Functions

static encodeOID ($oid)
 
static loadPrivate ($data, $passphrase= '')
 
static loadPublic ($data)
 

Public Attributes

const AUTH_MAGIC = "openssh-key-v1\x00"
 Magic value used to identity OpenSSH private keys.
 

Static Private Member Functions

static parseECDSA ($data, $passphrase)
 
static parseOpensshPrivateKey ($data, $passphrase)
 
static parseUnknown ($data, $passphrase)
 

Detailed Description

OpenSSH key loader.

This class can read OpenSSH's Private Key format. See http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.key?rev=1.1 for more information on this format.

Definition at line 21 of file Openssh.php.

Member Function Documentation

static fpoirotte\Pssht\KeyLoader\Openssh::encodeOID (   $oid)
static

Encode a textual OID into its ASN.1 representation.

See https://msdn.microsoft.com/en-us/library/bb540809%28v=vs.85%29.aspx for an explanation of the algorithm used.

Parameters
string$oidHuman-readable representation of an OID (eg. ".1.3.6.1.2.1.1.1").
Return values
stringBinary representation for the given OID.

Definition at line 377 of file Openssh.php.

static fpoirotte\Pssht\KeyLoader\Openssh::parseOpensshPrivateKey (   $data,
  $passphrase 
)
staticprivate

Parse a file using the new OpenSSH private key format.

Parameters
string$dataRaw data contained in the key file.
string$passphrasePrivate passphrase to use to unlock the contents.
Return values
fpoirotte::Pssht:KeyInterfaceThe actual key.
See also
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.key?rev=1.1

Definition at line 201 of file Openssh.php.

static fpoirotte\Pssht\KeyLoader\Openssh::parseUnknown (   $data,
  $passphrase 
)
staticprivate

Attempt to parse an OpenSSH key type which is not recognized by the PHP OpenSSL extension.

Parameters
string$dataRaw data contained in the key file.
string$passphrasePrivate passphrase to use to unlock the contents.
Return values
fpoirotte::Pssht:KeyInterfaceThe actual key.

Definition at line 180 of file Openssh.php.


The documentation for this class was generated from the following file: