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

Public Member Functions

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

Static Public Member Functions

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

Detailed Description

Interface for a MAC algorithm.

Definition at line 17 of file MACInterface.php.

Constructor & Destructor Documentation

fpoirotte\Pssht\MAC\MACInterface::__construct (   $key)

Construct a new MAC algorithm.

Parameters
string$keyKey for the MAC algorithm.

Implemented in fpoirotte\Pssht\MAC\Base96, fpoirotte\Pssht\MAC\Base, fpoirotte\Pssht\MAC\None, fpoirotte\Pssht\MAC\OpensshCom\UMAC\Len128, and fpoirotte\Pssht\MAC\OpensshCom\UMAC\Len64.

Member Function Documentation

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

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.

Implemented in fpoirotte\Pssht\MAC\Base96, fpoirotte\Pssht\MAC\Base, fpoirotte\Pssht\MAC\None, and fpoirotte\Pssht\MAC\OpensshCom\UMAC\Base.

static fpoirotte\Pssht\MAC\MACInterface::getKeySize ( )
static

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

Return values
intMAC key size in bytes.

Implemented in fpoirotte\Pssht\MAC\Base96, fpoirotte\Pssht\MAC\Base, fpoirotte\Pssht\MAC\None, fpoirotte\Pssht\MAC\OpensshCom\UMAC\Len128, and fpoirotte\Pssht\MAC\OpensshCom\UMAC\Len64.

static fpoirotte\Pssht\MAC\MACInterface::getSize ( )
static

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

Return values
intMAC size in bytes.

Implemented in fpoirotte\Pssht\MAC\Base96, fpoirotte\Pssht\MAC\Base, fpoirotte\Pssht\MAC\None, fpoirotte\Pssht\MAC\OpensshCom\UMAC\Len128, and fpoirotte\Pssht\MAC\OpensshCom\UMAC\Len64.


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