TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Rsaauth\Backend\PhpBackend Class Reference
Inheritance diagram for TYPO3\CMS\Rsaauth\Backend\PhpBackend:
TYPO3\CMS\Rsaauth\Backend\AbstractBackend tx_rsaauth_php_backend

Public Member Functions

 decrypt ($privateKey, $data)
 
 isAvailable ()
 
- Public Member Functions inherited from TYPO3\CMS\Rsaauth\Backend\AbstractBackend
 createNewKeyPair ()
 
 decrypt ($privateKey, $data)
 
 isAvailable ()
 
 getLastError ()
 

Protected Member Functions

 extractExponent ($data)
 
 extractPublicKeyModulus ($data)
 

Additional Inherited Members

- Protected Attributes inherited from TYPO3\CMS\Rsaauth\Backend\AbstractBackend
 $error = ''
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! This class contains a PHP OpenSSL backend for the TYPO3 RSA authentication service. See class for the information on using backends.

Author
Dmitry Dulepov dmitr.nosp@m.y@ty.nosp@m.po3.o.nosp@m.rg

Definition at line 24 of file PhpBackend.php.

Member Function Documentation

◆ decrypt()

TYPO3\CMS\Rsaauth\Backend\PhpBackend::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 Decrypted data or NULL in case of a error
See also
::decrypt()

Definition at line 77 of file PhpBackend.php.

References $result.

◆ extractExponent()

TYPO3\CMS\Rsaauth\Backend\PhpBackend::extractExponent (   $data)
protected

Extracts the exponent from the OpenSSL CSR

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

Definition at line 113 of file PhpBackend.php.

◆ extractPublicKeyModulus()

TYPO3\CMS\Rsaauth\Backend\PhpBackend::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 126 of file PhpBackend.php.

References $result.

◆ isAvailable()

TYPO3\CMS\Rsaauth\Backend\PhpBackend::isAvailable ( )

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

Returns
void
See also
::isAvailable()

Definition at line 92 of file PhpBackend.php.

References $result.