pssht
latest
SSH server library written in PHP
|
Public Member Functions | |
__construct ($iv, $key) | |
decrypt ($seqno, $data) | |
encrypt ($seqno, $data) | |
Static Public Member Functions | |
static | getBlockSize () |
static | getIVSize () |
static | getKeySize () |
![]() | |
static | getName () |
Return the name of the algorithm. | |
Interface for an encryption/decryption algorithm.
Definition at line 17 of file EncryptionInterface.php.
fpoirotte\Pssht\Encryption\EncryptionInterface::__construct | ( | $iv, | |
$key | |||
) |
Construct an encryption/decryption algorithm.
string | $iv | Initialization vector for the algorithm. |
string | $key | Encryption/decrytion key. |
Implemented in fpoirotte\Pssht\Encryption\Base, fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM, fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305, fpoirotte\Pssht\Encryption\Stream\Arcfour256, and fpoirotte\Pssht\Encryption\None.
fpoirotte\Pssht\Encryption\EncryptionInterface::decrypt | ( | $seqno, | |
$data | |||
) |
Decrypt data using the algorithm.
int | $seqno | Sequence number. |
string | $data | Data to decrypt. |
string | Decrypted data. |
Implemented in fpoirotte\Pssht\Encryption\Base, fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM, fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305, and fpoirotte\Pssht\Encryption\None.
fpoirotte\Pssht\Encryption\EncryptionInterface::encrypt | ( | $seqno, | |
$data | |||
) |
Encrypt data using the algorithm.
int | $seqno | Sequence number. |
string | $data | Data to encrypt. |
string | Encrypted data. |
Implemented in fpoirotte\Pssht\Encryption\Base, fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM, fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305, and fpoirotte\Pssht\Encryption\None.
|
static |
Get the algorithm's block size.
int | Block size (in bytes). |
Implemented in fpoirotte\Pssht\Encryption\Base, fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM, fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305, and fpoirotte\Pssht\Encryption\None.
|
static |
Get the algorithm's IV size.
int | Initialization vector size (in bytes). |
Implemented in fpoirotte\Pssht\Encryption\Base, fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM, fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305, and fpoirotte\Pssht\Encryption\None.
|
static |
Get the algorithm's key size.
int | Key size (in bytes). |
Implemented in fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM, fpoirotte\Pssht\Encryption\Stream\Arcfour256, fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305, fpoirotte\Pssht\Encryption\None, fpoirotte\Pssht\Encryption\CBC\AES256, fpoirotte\Pssht\Encryption\CBC\CAST128, fpoirotte\Pssht\Encryption\CBC\Serpent256, fpoirotte\Pssht\Encryption\CBC\TripleDES, fpoirotte\Pssht\Encryption\CBC\Twofish256, fpoirotte\Pssht\Encryption\Stream\Arcfour, fpoirotte\Pssht\Encryption\Stream\Arcfour128, fpoirotte\Pssht\Encryption\OpensshCom\AES256GCM, fpoirotte\Pssht\Encryption\CBC\AES128, fpoirotte\Pssht\Encryption\CBC\AES192, fpoirotte\Pssht\Encryption\CBC\Blowfish, fpoirotte\Pssht\Encryption\CBC\IDEA, fpoirotte\Pssht\Encryption\CBC\Serpent128, fpoirotte\Pssht\Encryption\CBC\Serpent192, fpoirotte\Pssht\Encryption\CBC\Twofish, fpoirotte\Pssht\Encryption\CBC\Twofish128, and fpoirotte\Pssht\Encryption\CBC\Twofish192.