RSA private key

category Zend
package Zend_Crypt
subpackage PublicKey

 Methods

Constructor

__construct(string $pemString, string $passPhrase) 

Parameters

$pemString

string

$passPhrase

string

Exceptions

\Zend\Crypt\PublicKey\Rsa\Exception\RuntimeException

__toString()

__toString() : string
Inherited

inherited_from \Zend\Crypt\PublicKey\Rsa\AbstractKey::__toString()

Returns

string

Decrypt using this key

decrypt(string $data) : string

Encrypt using this key

encrypt(string $data) : string

Create private key instance from PEM formatted key file

fromFile(string $pemFile, string | null $passPhrase) : \Zend\Crypt\PublicKey\Rsa\PrivateKey

Parameters

$pemFile

string

$passPhrase

stringnull

Exceptions

\Zend\Crypt\PublicKey\Rsa\Exception\InvalidArgumentException

Returns

Retrieve openssl key resource

getOpensslKeyResource() : resource
Inherited

inherited_from \Zend\Crypt\PublicKey\Rsa\AbstractKey::getOpensslKeyResource()

Returns

resource

Get the public key

getPublicKey() : \Zend\Crypt\PublicKey\Rsa\PublicKey

Get key size in bits

getSize() : int
Inherited

inherited_from \Zend\Crypt\PublicKey\Rsa\AbstractKey::getSize()

Returns

int

Get string representation of this key

toString() : string

Returns

string

 Properties

 

Openssl details array

$details : array
Inherited

inherited_from \Zend\Crypt\PublicKey\Rsa\AbstractKey::$$details
 

Key Resource

$opensslKeyResource : resource
Inherited

inherited_from \Zend\Crypt\PublicKey\Rsa\AbstractKey::$$opensslKeyResource
 

PEM formatted key

$pemString : string
Inherited

inherited_from \Zend\Crypt\PublicKey\Rsa\AbstractKey::$$pemString
 

Public key

$publicKey : \Zend\Crypt\PublicKey\Rsa\PublicKey

 Constants

 

DEFAULT_KEY_SIZE

DEFAULT_KEY_SIZE 
Inherited

inherited_from \Zend\Crypt\PublicKey\Rsa\AbstractKey::DEFAULT_KEY_SIZE