PKCS8
abstract class PKCS8 extends PKCS (View source)
PKCS#8 Formatted Key Handler
Constants
MODE_ANY |
Auto-detect the format |
MODE_PEM |
Require base64-encoded PEM's be supplied |
MODE_DER |
Require raw DER's be supplied |
Properties
static protected int | $format | Is the key a base-64 encoded PEM, DER or should it be auto-detected? | from PKCS |
Methods
Sets the default encryption algorithm
Sets the default encryption algorithm for PBES2
Sets the iteration count
Sets the PRF for PBES2
Break a public or private key down into its constituent components
Wrap a private key appropriately
Wrap a public key appropriately
Returns the encryption parameters used by the key
Details
in
PKCS at line 54
static
requirePEM()
Require base64-encoded PEM's be supplied
in
PKCS at line 64
static
requireDER()
Require raw DER's be supplied
in
PKCS at line 76
static
requireAny()
Accept any format and auto detect the format
This is the default setting
static
setEncryptionAlgorithm(string $algo)
Sets the default encryption algorithm
static
setEncryptionScheme(string $algo)
Sets the default encryption algorithm for PBES2
static
setIterationCount(int $count)
Sets the iteration count
static
setPRF(string $algo)
Sets the PRF for PBES2
static protected array
load(string $key, string $password = '')
Break a public or private key down into its constituent components
static protected string
wrapPrivateKey(string $key, string $attr, mixed $params, string $password, string $oid = null, string $publicKey = '', array $options = [])
Wrap a private key appropriately
static protected string
wrapPublicKey(string $key, mixed $params, string $oid = null)
Wrap a public key appropriately
static array
extractEncryptionAlgorithm(string $key)
Returns the encryption parameters used by the key