pssht  latest
SSH server library written in PHP
fpoirotte\Pssht\Encryption\EncryptionInterface Interface Reference
+ Inheritance diagram for fpoirotte\Pssht\Encryption\EncryptionInterface:

Public Member Functions

 __construct ($iv, $key)
 
 decrypt ($seqno, $data)
 
 encrypt ($seqno, $data)
 

Static Public Member Functions

static getBlockSize ()
 
static getIVSize ()
 
static getKeySize ()
 
- Static Public Member Functions inherited from fpoirotte\Pssht\Algorithms\AlgorithmInterface
static getName ()
 Return the name of the algorithm.
 

Detailed Description

Interface for an encryption/decryption algorithm.

Definition at line 17 of file EncryptionInterface.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\Encryption\EncryptionInterface::__construct (   $iv,
  $key 
)

Construct an encryption/decryption algorithm.

Parameters
string$ivInitialization vector for the algorithm.
string$keyEncryption/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.

Member Function Documentation

fpoirotte\Pssht\Encryption\EncryptionInterface::decrypt (   $seqno,
  $data 
)

Decrypt data using the algorithm.

Parameters
int$seqnoSequence number.
string$dataData to decrypt.
Return values
stringDecrypted 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.

Parameters
int$seqnoSequence number.
string$dataData to encrypt.
Return values
stringEncrypted data.

Implemented in fpoirotte\Pssht\Encryption\Base, fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM, fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305, and fpoirotte\Pssht\Encryption\None.

static fpoirotte\Pssht\Encryption\EncryptionInterface::getBlockSize ( )
static
static fpoirotte\Pssht\Encryption\EncryptionInterface::getIVSize ( )
static

Get the algorithm's IV size.

Return values
intInitialization 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.


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