OpenSSH
abstract class OpenSSH extends OpenSSH (View source)
OpenSSH Formatted RSA Key Handler
Properties
static protected string | $comment | Default comment | from OpenSSH |
static protected bool | $binary | Binary key flag | from OpenSSH |
static protected array | $types | Supported Key Types |
Methods
static array
load(string $key, string $password = '')
Break a public or private key down into its constituent components
static string
wrapPrivateKey(string $publicKey, string $privateKey, string $password, array $options)
Wrap a private key appropriately
from
OpenSSH
static string
savePublicKey(BigInteger $n, BigInteger $e, array $options = [])
Convert a public key to the appropriate format
static string
savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, string $password = '', array $options = [])
Convert a private key to the appropriate format.
Details
static
setComment(string $comment)
Sets the default comment
static array
load(string $key, string $password = '')
Break a public or private key down into its constituent components
static
setBinaryOutput(bool $enabled)
Toggle between binary and printable keys
Printable keys are what are generated by default. These are the ones that go in $HOME/.ssh/authorized_key.
static protected string
wrapPrivateKey(string $publicKey, string $privateKey, string $password, array $options)
Wrap a private key appropriately
static string
savePublicKey(BigInteger $n, BigInteger $e, array $options = [])
Convert a public key to the appropriate format
static string
savePrivateKey(BigInteger $n, BigInteger $e, BigInteger $d, array $primes, array $exponents, array $coefficients, string $password = '', array $options = [])
Convert a private key to the appropriate format.