PKCS1

Extends\phpseclib3\Crypt\Common\Formats\Keys\PKCS

PKCS1 Formatted Key Handler

author

Jim Wigginton terrafrost@php.net

package

Default

Methods

Generate a symmetric key for PKCS#1 keys

generateSymmetricKey(string $password,string $iv,integer $length): string
static

Arguments

$password

string

$iv

string

$length

integer

Response

string

Returns the mode constant corresponding to the mode string

getEncryptionMode(string $mode): integer
static
Throws
\UnexpectedValueException

if the block cipher mode is unsupported

Arguments

$mode

string

Response

integer

Returns a cipher object corresponding to a string

getEncryptionObject(string $algo): string
static
Throws
\UnexpectedValueException

if the encryption algorithm is unsupported

Arguments

$algo

string

Response

string

Break a public or private key down into its constituent components

load(string $key,string $password): array
static

Arguments

$key

string

$password

string

optional

Response

array

Accept any format and auto detect the format

requireAny()
inheritedstatic

This is the default setting

Require raw DER's be supplied

requireDER()
inheritedstatic

Require base64-encoded PEM's be supplied

requirePEM()
inheritedstatic

Sets the default encryption algorithm

setEncryptionAlgorithm(string $algo)
static

Arguments

$algo

string

Wrap a private key appropriately

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

Arguments

$key

string

$type

string

$password

string

$options

array

optional

Response

string

Wrap a public key appropriately

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

Arguments

$key

string

$type

string

Response

string

Constants

Auto-detect the format

MODE_ANY
inherited

Require base64-encoded PEM's be supplied

MODE_PEM
inherited

Require raw DER's be supplied

MODE_DER
inherited

Properties

Default encryption algorithm

defaultEncryptionAlgorithm :string
static
var

Type(s)

string

Is the key a base-64 encoded PEM, DER or should it be auto-detected?

format :integer
inheritedstatic
var

Type(s)

integer