Zend\Crypt\PublicKey\Rsa\PublicKey
RSA public key
Synopsis
class PublicKey
extends AbstractKey
{
- // constants
- const CERT_START = '-----BEGIN CERTIFICATE-----';
- // Inherited constants from AbstractKey
- const DEFAULT_KEY_SIZE = 2048;
- // members
- protected string $certificateString;
- // Inherited members from AbstractKey
- protected string $pemString;
- protected resource $opensslKeyResource;
- protected array $details;
- // methods
- public static PublicKey fromFile()
- public void __construct()
- public string encrypt()
- public string decrypt()
- public string getCertificate()
- 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 |
---|---|
CERT_START | '-----BEGIN CERTIFICATE-----' |
DEFAULT_KEY_SIZE | 2048 |
Members
protected
- $certificateString — string
- $details
—
array
Openssl details array - $opensslKeyResource
—
resource
Key Resource - $pemString
—
string
PEM formatted key
Methods
public
- __construct() — Construct public key with PEM formatted string or X.509 certificate
- decrypt() — Decrypt using this key
- encrypt() — Encrypt using this key
- fromFile() — Create public key instance public key from PEM formatted key file or X.509 certificate file
- getCertificate() — Get certificate string
- toString() — To string
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