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

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 ()
 
static isAvailable ()
 

Protected Attributes

 $gcm
 Underlying GCM implementation.
 
 $iv
 Initialization vector.
 

Detailed Description

AES-GCM with a 128-bit key.

Definition at line 17 of file AES128GCM.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM::__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 27 of file AES128GCM.php.

References fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM\$iv.

Member Function Documentation

fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM::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 72 of file AES128GCM.php.

References fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM\$iv.

fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM::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 62 of file AES128GCM.php.

References fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM\$iv.

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

Get the algorithm's block size.

Return values
intBlock size (in bytes).

Implements fpoirotte\Pssht\Encryption\EncryptionInterface.

Definition at line 52 of file AES128GCM.php.

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

Get the algorithm's IV size.

Return values
intInitialization vector size (in bytes).

Implements fpoirotte\Pssht\Encryption\EncryptionInterface.

Definition at line 47 of file AES128GCM.php.

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

Get the algorithm's key size.

Return values
intKey size (in bytes).

Implements fpoirotte\Pssht\Encryption\EncryptionInterface.

Definition at line 42 of file AES128GCM.php.

static fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM::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 57 of file AES128GCM.php.

static fpoirotte\Pssht\Encryption\OpensshCom\AES128GCM::isAvailable ( )
staticfinal

Determine whether the algorithm is available.

Return values
booltrue if the algorithm is available, false otherwise.

Implements fpoirotte\Pssht\Algorithms\AvailabilityInterface.

Definition at line 87 of file AES128GCM.php.


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