TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
PhpBackend Class Reference
Inheritance diagram for PhpBackend:
AbstractBackend

Public Member Functions

 decrypt ($privateKey, $data)
 
 isAvailable ()
 
- Public Member Functions inherited from AbstractBackend
 createNewKeyPair ()
 
 decrypt ($privateKey, $data)
 
 isAvailable ()
 
 getLastError ()
 

Protected Member Functions

 extractExponent ($data)
 
 extractPublicKeyModulus ($data)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractBackend
 $error = ''
 

Detailed Description

This class contains a PHP OpenSSL backend for the TYPO3 RSA authentication service. See class for the information on using backends.

Definition at line 22 of file PhpBackend.php.

Member Function Documentation

decrypt (   $privateKey,
  $data 
)

Decrypts data using the private key. This implementation uses PHP OpenSSL extension.

Parameters
string$privateKeyThe private key (obtained from a call to createNewKeyPair())
string$dataData to decrypt (base64-encoded)
Returns
string|NULL Decrypted data or NULL in case of an error
See Also
::decrypt()

Definition at line 77 of file PhpBackend.php.

extractExponent (   $data)
protected

Extracts the exponent from the OpenSSL CSR

Parameters
string$dataThe result of openssl_csr_export()
Returns
int The exponent as a number

Definition at line 115 of file PhpBackend.php.

extractPublicKeyModulus (   $data)
protected

Extracts public key modulus from the OpenSSL CSR.

Parameters
string$dataThe result of openssl_csr_export()
Returns
string Modulus as uppercase hex string

Definition at line 129 of file PhpBackend.php.

isAvailable ( )

Checks if this backend is available for calling. In particular checks if PHP OpenSSl extension is installed and functional.

Returns
bool
See Also
::isAvailable()

Definition at line 93 of file PhpBackend.php.