pssht  latest
SSH server library written in PHP
fpoirotte\Pssht\MAC\Base96 Class Reference
+ Inheritance diagram for fpoirotte\Pssht\MAC\Base96:

Public Member Functions

 __construct ($key)
 
 compute ($seqno, $data)
 

Static Public Member Functions

static getKeySize ()
 
static getName ()
 Return the name of the algorithm.
 
static getSize ()
 
static isAvailable ()
 
- Static Public Member Functions inherited from fpoirotte\Pssht\MAC\Base96Interface
static getBaseClass ()
 

Protected Attributes

 $subhash
 Subhash performing the real MAC operation.
 

Detailed Description

Abstract base class for a MAC truncated after 96 bits.

Definition at line 22 of file Base96.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\MAC\Base96::__construct (   $key)
final

Construct a new MAC algorithm.

Parameters
string$keyKey for the MAC algorithm.

Implements fpoirotte\Pssht\MAC\MACInterface.

Definition at line 30 of file Base96.php.

Member Function Documentation

fpoirotte\Pssht\MAC\Base96::compute (   $seqno,
  $data 
)
final

Compute the MAC for some data.

Parameters
int$seqnoSequence number of the message for which the MAC applies.
string$dataData whose MAC must be computed.
Return values
stringMAC for the given data.

Implements fpoirotte\Pssht\MAC\MACInterface.

Definition at line 42 of file Base96.php.

References fpoirotte\Pssht\MAC\Base96\getSize().

static fpoirotte\Pssht\MAC\Base96::getKeySize ( )
staticfinal

Get the size of a key compatible with this MAC algorithm.

Return values
intMAC key size in bytes.

Implements fpoirotte\Pssht\MAC\MACInterface.

Definition at line 51 of file Base96.php.

static fpoirotte\Pssht\MAC\Base96::getSize ( )
staticfinal

Get the size of a MAC signature generated with this algorithm.

Return values
intMAC size in bytes.

Implements fpoirotte\Pssht\MAC\MACInterface.

Definition at line 57 of file Base96.php.

Referenced by fpoirotte\Pssht\MAC\Base96\compute().

static fpoirotte\Pssht\MAC\Base96::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 62 of file Base96.php.


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