TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
Keypair Class Reference
Inheritance diagram for Keypair:
SingletonInterface

Public Member Functions

 isReady ()
 
 getExponent ()
 
 setExponent ($exponent)
 
 getPrivateKey ()
 
 setPrivateKey ($privateKey)
 
 getPublicKeyModulus ()
 
 setPublicKey ($publicKeyModulus)
 

Protected Member Functions

 hasExponent ()
 
 hasPrivateKey ()
 
 hasPublicKeyModulus ()
 

Protected Attributes

 $exponent = 0
 
 $privateKey = ''
 
 $publicKeyModulus = 0
 

Detailed Description

This class contain an RSA key pair. Its purpose is to keep to keys and transfer these keys between other PHP classes.

Definition at line 21 of file Keypair.php.

Member Function Documentation

getExponent ( )

Retrieves the exponent.

Returns
int the exponent

Definition at line 59 of file Keypair.php.

References Keypair\$exponent.

Referenced by Keypair\hasExponent().

getPrivateKey ( )

Retrieves the private key.

Returns
string The private key

Definition at line 97 of file Keypair.php.

References Keypair\$privateKey.

Referenced by Keypair\hasPrivateKey().

getPublicKeyModulus ( )

Retrieves the public key modulus

Returns
int the public key modulus

Definition at line 135 of file Keypair.php.

References Keypair\$publicKeyModulus.

Referenced by Keypair\hasPublicKeyModulus().

hasExponent ( )
protected

Checks whether an exponent already has been set.

Returns
bool

Definition at line 87 of file Keypair.php.

References Keypair\getExponent().

Referenced by Keypair\isReady(), and Keypair\setExponent().

hasPrivateKey ( )
protected

Checks whether a private key already has been set.

Returns
bool

Definition at line 125 of file Keypair.php.

References Keypair\getPrivateKey().

Referenced by Keypair\isReady(), and Keypair\setPrivateKey().

hasPublicKeyModulus ( )
protected

Checks whether a public key modulus already has been set.

Returns
bool

Definition at line 163 of file Keypair.php.

References Keypair\getPublicKeyModulus().

Referenced by Keypair\isReady(), and Keypair\setPublicKey().

isReady ( )

Checks if this key pair already has been provided with all data.

Returns
bool

Definition at line 49 of file Keypair.php.

References Keypair\hasExponent(), Keypair\hasPrivateKey(), and Keypair\hasPublicKeyModulus().

setExponent (   $exponent)

Sets the exponent

Note: This method must not be called more than one time.

Parameters
int$exponentthe new exponent
Returns
void
Exceptions
BadMethodCallException if the method was called more than one time

Definition at line 73 of file Keypair.php.

References Keypair\$exponent, and Keypair\hasExponent().

setPrivateKey (   $privateKey)

Sets the private key.

Note: This method must not be called more than one time.

Parameters
string$privateKeyThe new private key
Returns
void
Exceptions
BadMethodCallException if the method was called more than one time

Definition at line 111 of file Keypair.php.

References Keypair\$privateKey, and Keypair\hasPrivateKey().

setPublicKey (   $publicKeyModulus)

Sets the public key modulus.

Note: This method must not be called more than one time.

Parameters
int$publicKeyModulusthe new public key modulus
Returns
void
Exceptions
BadMethodCallException if the method was called more than one time

Definition at line 149 of file Keypair.php.

References Keypair\$publicKeyModulus, and Keypair\hasPublicKeyModulus().

Member Data Documentation

$exponent = 0
protected

Definition at line 28 of file Keypair.php.

Referenced by Keypair\getExponent(), and Keypair\setExponent().

$privateKey = ''
protected

Definition at line 35 of file Keypair.php.

Referenced by Keypair\getPrivateKey(), and Keypair\setPrivateKey().

$publicKeyModulus = 0
protected

Definition at line 42 of file Keypair.php.

Referenced by Keypair\getPublicKeyModulus(), and Keypair\setPublicKey().