abstract class PKCS1 extends PKCS1 (View source)

"PKCS1" Formatted DH 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

static 
requirePEM()

Require base64-encoded PEM's be supplied

from  PKCS
static 
requireDER()

Require raw DER's be supplied

from  PKCS
static 
requireAny()

Accept any format and auto detect the format

from  PKCS
static 
setEncryptionAlgorithm(string $algo)

Sets the default encryption algorithm

from  PKCS1
static array
load(string $key, string $password = '')

Break a public or private key down into its constituent components

static string
wrapPrivateKey(string $key, string $type, string $password, array $options = [])

Wrap a private key appropriately

from  PKCS1
static string
wrapPublicKey(string $key, string $type)

Wrap a public key appropriately

from  PKCS1
static string
saveParameters(BigInteger $prime, BigInteger $base, array $options = [])

Convert EC parameters to the appropriate format

Details

static requirePEM()

Require base64-encoded PEM's be supplied

static requireDER()

Require raw DER's be supplied

static requireAny()

Accept any format and auto detect the format

This is the default setting

static setEncryptionAlgorithm(string $algo)

Sets the default encryption algorithm

Parameters

string $algo

static array load(string $key, string $password = '')

Break a public or private key down into its constituent components

Parameters

string $key
string $password optional

Return Value

array

static protected string wrapPrivateKey(string $key, string $type, string $password, array $options = [])

Wrap a private key appropriately

Parameters

string $key
string $type
string $password
array $options optional

Return Value

string

static protected string wrapPublicKey(string $key, string $type)

Wrap a public key appropriately

Parameters

string $key
string $type

Return Value

string

static string saveParameters(BigInteger $prime, BigInteger $base, array $options = [])

Convert EC parameters to the appropriate format

Parameters

BigInteger $prime
BigInteger $base
array $options

Return Value

string