pssht
latest
SSH server library written in PHP
|
Public Member Functions | |
__construct () | |
add ($user,\fpoirotte\Pssht\Key\KeyInterface $key) | |
count ($user) | |
exists ($user, $key) | |
get ($user) | |
remove ($user,\fpoirotte\Pssht\Key\KeyInterface $key) | |
Protected Member Functions | |
getIdentifier (\fpoirotte\Pssht\Key\KeyInterface $key) | |
Protected Attributes | |
$keys | |
Public/private keys currently stored. | |
Provides storage for public/private keys.
Definition at line 17 of file KeyStore.php.
fpoirotte\Pssht\KeyStore::__construct | ( | ) |
Construct a new store.
Definition at line 25 of file KeyStore.php.
fpoirotte\Pssht\KeyStore::add | ( | $user, | |
\fpoirotte\Pssht\Key\KeyInterface | $key | ||
) |
Add a new key in the store.
string | $user | User the key belongs to. |
fpoirotte::Pssht::Key::KeyInterface | $key | Public/private key to add. |
Definition at line 55 of file KeyStore.php.
References fpoirotte\Pssht\KeyStore\getIdentifier().
fpoirotte\Pssht\KeyStore::count | ( | $user | ) |
Return the number of keys currently registered for the given user.
string | $user | User whose keys must be counted. |
int | Number of available keys for the given user. |
Definition at line 145 of file KeyStore.php.
fpoirotte\Pssht\KeyStore::exists | ( | $user, | |
$key | |||
) |
Test whether a given key as been registered for a specific user.
string | $user | User for which the key is tested. |
string | fpoirotte::Pssht::Key::KeyInterface | $key | Key to test. |
bool | true if the given key has been registered for the given user, false otherwise. |
Definition at line 119 of file KeyStore.php.
References fpoirotte\Pssht\KeyStore\getIdentifier().
fpoirotte\Pssht\KeyStore::get | ( | $user | ) |
Retrieve a list of the keys currently stored for the given user.
string | $user | User whose keys should be retrieved. |
array | Public/private keys for the given user. |
Definition at line 92 of file KeyStore.php.
|
protected |
Return the identifier for a key.
fpoirotte::Pssht::Key::KeyInterface | $key | Public or private key. |
string | SSH identifier for the key. |
Definition at line 39 of file KeyStore.php.
Referenced by fpoirotte\Pssht\KeyStore\add(), fpoirotte\Pssht\KeyStore\exists(), and fpoirotte\Pssht\KeyStore\remove().
fpoirotte\Pssht\KeyStore::remove | ( | $user, | |
\fpoirotte\Pssht\Key\KeyInterface | $key | ||
) |
Remove a key from the store.
string | $user | User the key belongs to. |
fpoirotte::Pssht::Key::KeyInterface | $key | Public/private key to remove. |
Definition at line 73 of file KeyStore.php.
References fpoirotte\Pssht\KeyStore\getIdentifier().