PKCS1
abstract class PKCS1 extends PKCS1 (View source)
PKCS#1 Formatted DSA 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
Break a public or private key down into its constituent components
Wrap a private key appropriately
Convert DSA parameters to the appropriate format
Convert a private key to the appropriate format.
Convert a public key to the appropriate format
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
in
PKCS1 at line 51
static
setEncryptionAlgorithm(string $algo)
Sets the default encryption algorithm
static array
load(string $key, string $password = '')
Break a public or private key down into its constituent components
in
PKCS1 at line 186
static protected string
wrapPrivateKey(string $key, string $type, string $password, array $options = [])
Wrap a private key appropriately
in
PKCS1 at line 217
static protected string
wrapPublicKey(string $key, string $type)
Wrap a public key appropriately
static string
saveParameters(BigInteger $p, BigInteger $q, BigInteger $g)
Convert DSA parameters to the appropriate format
static string
savePrivateKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y, BigInteger $x, string $password = '', array $options = [])
Convert a private key to the appropriate format.
static string
savePublicKey(BigInteger $p, BigInteger $q, BigInteger $g, BigInteger $y)
Convert a public key to the appropriate format