Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Zend_Crypt_Rsa_Key_Private Class Reference
Inheritance diagram for Zend_Crypt_Rsa_Key_Private:
Zend_Crypt_Rsa_Key

Public Member Functions

 __construct ($pemString, $passPhrase=null)
 
 getPublicKey ()
 
- Public Member Functions inherited from Zend_Crypt_Rsa_Key
 getOpensslKeyResource ()
 
 toString ()
 
 __toString ()
 
 count ()
 
 getType ()
 

Protected Member Functions

 _parse ($passPhrase)
 

Protected Attributes

 $_publicKey = null
 
- Protected Attributes inherited from Zend_Crypt_Rsa_Key
 $_pemString = null
 
 $_details = array()
 
 $_opensslKeyResource = null
 

Detailed Description

Definition at line 34 of file Private.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $pemString,
  $passPhrase = null 
)

Definition at line 39 of file Private.php.

40  {
41  $this->_pemString = $pemString;
42  $this->_parse($passPhrase);
43  }

Member Function Documentation

◆ _parse()

_parse (   $passPhrase)
protected
Parameters
string$passPhrase
Exceptions
Zend_Crypt_Exception
See also
Zend_Crypt_Exception

Definition at line 49 of file Private.php.

50  {
51  $result = openssl_get_privatekey($this->_pemString, $passPhrase);
52  if (!$result) {
56  #require_once 'Zend/Crypt/Exception.php';
57  throw new Zend_Crypt_Exception('Unable to load private key');
58  }
59  $this->_opensslKeyResource = $result;
60  $this->_details = openssl_pkey_get_details($this->_opensslKeyResource);
61  }

◆ getPublicKey()

getPublicKey ( )
See also
Zend_Crypt_Rsa_Key_Public

Definition at line 63 of file Private.php.

64  {
65  if ($this->_publicKey === null) {
69  #require_once 'Zend/Crypt/Rsa/Key/Public.php';
70  $this->_publicKey = new Zend_Crypt_Rsa_Key_Public($this->_details['key']);
71  }
72  return $this->_publicKey;
73  }

Field Documentation

◆ $_publicKey

$_publicKey = null
protected

Definition at line 37 of file Private.php.


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