pssht  latest
SSH server library written in PHP
fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305 Class Reference
+ Inheritance diagram for fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305:

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.
 
static getSize ()
 

Protected Attributes

 $aead
 Underlying implementation for Authenticated Encryption with Additional Data.
 

Detailed Description

ChaCha20 & Poly1305 combined to achieve AEAD.

Definition at line 17 of file ChaCha20Poly1305.php.

Constructor & Destructor Documentation

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

Construct an encryption/decryption algorithm.

Parameters
string$ivInitialization vector for the algorithm.
string$keyEncryption/decrytion key.

Implements fpoirotte\Pssht\Encryption\EncryptionInterface.

Definition at line 22 of file ChaCha20Poly1305.php.

Member Function Documentation

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

Decrypt data using the algorithm.

Parameters
int$seqnoSequence number.
string$dataData to decrypt.
Return values
stringDecrypted data.

Implements fpoirotte\Pssht\Encryption\EncryptionInterface.

Definition at line 60 of file ChaCha20Poly1305.php.

fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305::encrypt (   $seqno,
  $data 
)

Encrypt data using the algorithm.

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

Implements fpoirotte\Pssht\Encryption\EncryptionInterface.

Definition at line 52 of file ChaCha20Poly1305.php.

static fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305::getBlockSize ( )
static

Get the algorithm's block size.

Return values
intBlock size (in bytes).

Implements fpoirotte\Pssht\Encryption\EncryptionInterface.

Definition at line 42 of file ChaCha20Poly1305.php.

static fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305::getIVSize ( )
static

Get the algorithm's IV size.

Return values
intInitialization vector size (in bytes).

Implements fpoirotte\Pssht\Encryption\EncryptionInterface.

Definition at line 37 of file ChaCha20Poly1305.php.

static fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305::getKeySize ( )
static

Get the algorithm's key size.

Return values
intKey size (in bytes).

Implements fpoirotte\Pssht\Encryption\EncryptionInterface.

Definition at line 32 of file ChaCha20Poly1305.php.

static fpoirotte\Pssht\Encryption\OpensshCom\ChaCha20Poly1305::getSize ( )
static

Get the size of an Authentication Tag generated with this algorithm.

Return values
intAT size in bytes.

Implements fpoirotte\Pssht\Algorithms\AEAD\AEADInterface.

Definition at line 47 of file ChaCha20Poly1305.php.


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