Zend\Crypt\PublicKey\Rsa\PrivateKey
RSA private key
Synopsis
class PrivateKey
extends AbstractKey
{
- // Inherited constants from AbstractKey
- const DEFAULT_KEY_SIZE = 2048;
- // members
- protected PublicKey $publicKey;
- // Inherited members from AbstractKey
- protected string $pemString;
- protected resource $opensslKeyResource;
- protected array $details;
- // methods
- public static PrivateKey fromFile()
- public void __construct()
- public PublicKey getPublicKey()
- public string encrypt()
- public string decrypt()
- public string toString()
- // Inherited methods from AbstractKey
- public int getSize()
- public resource getOpensslKeyResource()
- public abstract string encrypt()
- public abstract string decrypt()
- public abstract string toString()
- public string __toString()
Hierarchy
Constants
Name | Value |
---|---|
DEFAULT_KEY_SIZE | 2048 |
Members
protected
- $details
—
array
Openssl details array - $opensslKeyResource
—
resource
Key Resource - $pemString
—
string
PEM formatted key - $publicKey
—
Zend\Crypt\PublicKey\Rsa\PublicKey
Public key
Methods
public
- __construct() — Constructor
- decrypt() — Decrypt using this key
- encrypt() — Encrypt using this key
- fromFile() — Create private key instance from PEM formatted key file
- getPublicKey() — Get the public key
- toString()
Inherited from Zend\Crypt\PublicKey\Rsa\AbstractKey
public
- __toString()
- decrypt() — Decrypt using this key
- encrypt() — Encrypt using this key
- getOpensslKeyResource() — Retrieve openssl key resource
- getSize() — Get key size in bits
- toString() — Get string representation of this key