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

Public Member Functions

 check ($message, $signature)
 
 serialize (\fpoirotte\Pssht\Wire\Encoder $encoder)
 
 sign ($message)
 

Static Public Member Functions

static unserialize (\fpoirotte\Pssht\Wire\Decoder $decoder, $private=null)
 
- Static Public Member Functions inherited from fpoirotte\Pssht\Algorithms\AlgorithmInterface
static getName ()
 Return the name of the algorithm.
 

Detailed Description

Interface for a public key algorithm.

Definition at line 17 of file KeyInterface.php.

Member Function Documentation

fpoirotte\Pssht\Key\KeyInterface::check (   $message,
  $signature 
)

Check the signature for a message.

Parameters
string$messageSigned message.
string$signatureSignature to check.
Return values
booltrue if the signature is valid for the given message, false otherwise.

Implemented in fpoirotte\Pssht\Key\SSH\ED25519, fpoirotte\Pssht\Key\SSH\DSS, fpoirotte\Pssht\Key\ECDSA\SHA2\Base, and fpoirotte\Pssht\Key\SSH\RSA.

fpoirotte\Pssht\Key\KeyInterface::serialize ( \fpoirotte\Pssht\Wire\Encoder  $encoder)

Serialize a key.

Parameters
fpoirotte::Pssht::Wire::Encoder$encoderEncoder to use to serialize the key.
Return values
stringSerialized representation of the key.

Implemented in fpoirotte\Pssht\Key\SSH\DSS, fpoirotte\Pssht\Key\SSH\ED25519, fpoirotte\Pssht\Key\SSH\RSA, and fpoirotte\Pssht\Key\ECDSA\SHA2\Base.

fpoirotte\Pssht\Key\KeyInterface::sign (   $message)

Sign a message using the key.

Parameters
string$messageMessage to sign.
Return values
stringMessage signature.

Implemented in fpoirotte\Pssht\Key\SSH\ED25519, fpoirotte\Pssht\Key\SSH\DSS, and fpoirotte\Pssht\Key\SSH\RSA.


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