‪TYPO3CMS  9.5
TYPO3\CMS\Rsaauth\Keypair Class Reference
Inheritance diagram for TYPO3\CMS\Rsaauth\Keypair:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

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

Protected Member Functions

bool hasExponent ()
 
bool hasPrivateKey ()
 
bool hasPublicKeyModulus ()
 

Protected Attributes

int $exponent = 0
 
string $privateKey = ''
 
int $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()

int TYPO3\CMS\Rsaauth\Keypair::getExponent ( )

Retrieves the exponent.

Returns
‪int the exponent

Definition at line 56 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\$exponent.

Referenced by TYPO3\CMS\Rsaauth\Keypair\hasExponent().

◆ getPrivateKey()

string TYPO3\CMS\Rsaauth\Keypair::getPrivateKey ( )

Retrieves the private key.

Returns
‪string The private key

Definition at line 93 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\$privateKey.

Referenced by TYPO3\CMS\Rsaauth\Keypair\hasPrivateKey().

◆ getPublicKeyModulus()

int TYPO3\CMS\Rsaauth\Keypair::getPublicKeyModulus ( )

Retrieves the public key modulus

Returns
‪int the public key modulus

Definition at line 130 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\$publicKeyModulus.

Referenced by TYPO3\CMS\Rsaauth\Keypair\hasPublicKeyModulus().

◆ hasExponent()

bool TYPO3\CMS\Rsaauth\Keypair::hasExponent ( )
protected

Checks whether an exponent already has been set.

Returns
‪bool

Definition at line 83 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\getExponent().

Referenced by TYPO3\CMS\Rsaauth\Keypair\isReady(), and TYPO3\CMS\Rsaauth\Keypair\setExponent().

◆ hasPrivateKey()

bool TYPO3\CMS\Rsaauth\Keypair::hasPrivateKey ( )
protected

Checks whether a private key already has been set.

Returns
‪bool

Definition at line 120 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\getPrivateKey().

Referenced by TYPO3\CMS\Rsaauth\Keypair\isReady(), and TYPO3\CMS\Rsaauth\Keypair\setPrivateKey().

◆ hasPublicKeyModulus()

bool TYPO3\CMS\Rsaauth\Keypair::hasPublicKeyModulus ( )
protected

Checks whether a public key modulus already has been set.

Returns
‪bool

Definition at line 157 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\getPublicKeyModulus().

Referenced by TYPO3\CMS\Rsaauth\Keypair\isReady(), and TYPO3\CMS\Rsaauth\Keypair\setPublicKey().

◆ isReady()

bool TYPO3\CMS\Rsaauth\Keypair::isReady ( )

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

Returns
‪bool

Definition at line 46 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\hasExponent(), TYPO3\CMS\Rsaauth\Keypair\hasPrivateKey(), and TYPO3\CMS\Rsaauth\Keypair\hasPublicKeyModulus().

◆ setExponent()

TYPO3\CMS\Rsaauth\Keypair::setExponent (   $exponent)

Sets the exponent

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

Parameters
int$exponent‪the new exponent
Exceptions

Definition at line 69 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\$exponent, and TYPO3\CMS\Rsaauth\Keypair\hasExponent().

◆ setPrivateKey()

TYPO3\CMS\Rsaauth\Keypair::setPrivateKey (   $privateKey)

Sets the private key.

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

Parameters
string$privateKey‪The new private key
Exceptions

Definition at line 106 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\$privateKey, and TYPO3\CMS\Rsaauth\Keypair\hasPrivateKey().

◆ setPublicKey()

TYPO3\CMS\Rsaauth\Keypair::setPublicKey (   $publicKeyModulus)

Sets the public key modulus.

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

Parameters
int$publicKeyModulus‪the new public key modulus
Exceptions

Definition at line 143 of file Keypair.php.

References TYPO3\CMS\Rsaauth\Keypair\$publicKeyModulus, and TYPO3\CMS\Rsaauth\Keypair\hasPublicKeyModulus().

Member Data Documentation

◆ $exponent

int TYPO3\CMS\Rsaauth\Keypair::$exponent = 0
protected

RSA public exponent (3 or 0x10001)

Definition at line 27 of file Keypair.php.

Referenced by TYPO3\CMS\Rsaauth\Keypair\getExponent(), and TYPO3\CMS\Rsaauth\Keypair\setExponent().

◆ $privateKey

string TYPO3\CMS\Rsaauth\Keypair::$privateKey = ''
protected

The private key

Definition at line 33 of file Keypair.php.

Referenced by TYPO3\CMS\Rsaauth\Keypair\getPrivateKey(), and TYPO3\CMS\Rsaauth\Keypair\setPrivateKey().

◆ $publicKeyModulus

int TYPO3\CMS\Rsaauth\Keypair::$publicKeyModulus = 0
protected

The public key modulus

Definition at line 39 of file Keypair.php.

Referenced by TYPO3\CMS\Rsaauth\Keypair\getPublicKeyModulus(), and TYPO3\CMS\Rsaauth\Keypair\setPublicKey().