Zend Framework
3.0
|
RSA public key. More...
Public Member Functions | |
__construct ($pemStringOrCertificate) | |
Construct public key with PEM formatted string or X.509 certificate. | |
encrypt ($data, $padding=OPENSSL_PKCS1_OAEP_PADDING) | |
Encrypt using this key. | |
decrypt ($data, $padding=OPENSSL_PKCS1_PADDING) | |
Decrypt using this key. | |
getCertificate () | |
Get certificate string. | |
toString () | |
To string. | |
Public Member Functions inherited from AbstractKey | |
getSize () | |
Get key size in bits. | |
getOpensslKeyResource () | |
Retrieve openssl key resource. | |
encrypt ($data) | |
Encrypt using this key. | |
decrypt ($data) | |
Decrypt using this key. | |
toString () | |
Get string representation of this key. | |
__toString () | |
Static Public Member Functions | |
static | fromFile ($pemOrCertificateFile) |
Create public key instance public key from PEM formatted key file or X.509 certificate file. | |
Public Attributes | |
const | CERT_START = '-----BEGIN CERTIFICATE-----' |
Public Attributes inherited from AbstractKey | |
const | DEFAULT_KEY_SIZE = 2048 |
Protected Attributes | |
$certificateString = null | |
Protected Attributes inherited from AbstractKey | |
$pemString = null | |
$opensslKeyResource = null | |
$details = [] | |
RSA public key.
__construct | ( | $pemStringOrCertificate | ) |
Construct public key with PEM formatted string or X.509 certificate.
string | $pemStringOrCertificate |
Exception\RuntimeException |
decrypt | ( | $data, | |
$padding = OPENSSL_PKCS1_PADDING |
|||
) |
Decrypt using this key.
string | $data | |
string | $padding |
Exception\InvalidArgumentException | |
Exception\RuntimeException |
encrypt | ( | $data, | |
$padding = OPENSSL_PKCS1_OAEP_PADDING |
|||
) |
Encrypt using this key.
Starting in 2.4.9/2.5.2, we changed the default padding to OPENSSL_PKCS1_OAEP_PADDING to prevent Bleichenbacher's chosen-ciphertext attack.
string | $data | |
string | $padding |
Exception\InvalidArgumentException | |
Exception\RuntimeException |
|
static |
Create public key instance public key from PEM formatted key file or X.509 certificate file.
string | $pemOrCertificateFile |
Exception\InvalidArgumentException |
getCertificate | ( | ) |
Get certificate string.
toString | ( | ) |
To string.
Exception\RuntimeException |
|
protected |
const CERT_START = '-----BEGIN CERTIFICATE-----' |