PHP Class phpseclib\Crypt\Common\PKCS8

Author: Jim Wigginton ([email protected])
Inheritance: extends PKCS
Show file Open project: phpseclib/phpseclib Class Usage Examples

Public Properties

Property Type Description
$defaultEncryptionAlgorithm string Default encryption algorithm
$defaultEncryptionScheme string Only used when defaultEncryptionAlgorithm is id-PBES2
$defaultIterationCount integer Default Iteration Count
$defaultPRF string Only used when defaultEncryptionAlgorithm is id-PBES2

Public Methods

Method Description
getPBES1EncryptionObject ( string $algo ) Returns a SymmetricKey object based on a PBES1 $algo
getPBES1Hash ( string $algo ) Returns a hash based on a PBES1 $algo
getPBES1KDF ( string $algo ) Returns a KDF baesd on a PBES1 $algo
getPBES2EncryptionObject ( string $algo ) Returns a SymmetricKey object baesd on a PBES2 $algo
load ( string $key, string $password = '' ) : array Break a public or private key down into its constituent components
setEncryptionAlgorithm ( string $algo ) Sets the default encryption algorithm
setEncryptionScheme ( string $algo ) Sets the default encryption algorithm for PBES2
setIterationCount ( integer $count ) Sets the iteration count
setPRF ( string $algo ) Sets the PRF for PBES2
wrapPrivateKey ( string $key, string $algorithm, string $attr, string $password ) : string Wrap a private key appropriately
wrapPublicKey ( string $key, $algorithm ) : string Wrap a public key appropriately

Method Details

getPBES1EncryptionObject() static public method

Returns a SymmetricKey object based on a PBES1 $algo
static public getPBES1EncryptionObject ( string $algo )
$algo string

getPBES1Hash() static public method

Returns a hash based on a PBES1 $algo
static public getPBES1Hash ( string $algo )
$algo string

getPBES1KDF() static public method

Returns a KDF baesd on a PBES1 $algo
static public getPBES1KDF ( string $algo )
$algo string

getPBES2EncryptionObject() static public method

Returns a SymmetricKey object baesd on a PBES2 $algo
static public getPBES2EncryptionObject ( string $algo )
$algo string

load() static public method

Break a public or private key down into its constituent components
static public load ( string $key, string $password = '' ) : array
$key string
$password string optional
return array

setEncryptionAlgorithm() static public method

Sets the default encryption algorithm
static public setEncryptionAlgorithm ( string $algo )
$algo string

setEncryptionScheme() static public method

Sets the default encryption algorithm for PBES2
static public setEncryptionScheme ( string $algo )
$algo string

setIterationCount() static public method

Sets the iteration count
static public setIterationCount ( integer $count )
$count integer

setPRF() static public method

Sets the PRF for PBES2
static public setPRF ( string $algo )
$algo string

wrapPrivateKey() static public method

Wrap a private key appropriately
static public wrapPrivateKey ( string $key, string $algorithm, string $attr, string $password ) : string
$key string
$algorithm string
$attr string
$password string
return string

wrapPublicKey() static public method

Wrap a public key appropriately
static public wrapPublicKey ( string $key, $algorithm ) : string
$key string
return string

Property Details

$defaultEncryptionAlgorithm static public property

Default encryption algorithm
static public string $defaultEncryptionAlgorithm
return string

$defaultEncryptionScheme static public property

Only used when defaultEncryptionAlgorithm is id-PBES2
static public string $defaultEncryptionScheme
return string

$defaultIterationCount static public property

Default Iteration Count
static public int $defaultIterationCount
return integer

$defaultPRF static public property

Only used when defaultEncryptionAlgorithm is id-PBES2
static public string $defaultPRF
return string