PHP Class phpseclib\Crypt\Common\PKCS1

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

Public Methods

Method Description
generateSymmetricKey ( string $password, string $iv, integer $length ) : string Generate a symmetric key for PKCS#1 keys
getEncryptionMode ( string $mode ) : integer Returns the mode constant corresponding to the mode string
getEncryptionObject ( string $algo ) : string Returns a cipher object corresponding to a string
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
wrapPrivateKey ( string $key, string $type, string $password ) : string Wrap a private key appropriately
wrapPublicKey ( string $key, string $type ) : string Wrap a public key appropriately

Method Details

generateSymmetricKey() static public method

Generate a symmetric key for PKCS#1 keys
static public generateSymmetricKey ( string $password, string $iv, integer $length ) : string
$password string
$iv string
$length integer
return string

getEncryptionMode() static public method

Returns the mode constant corresponding to the mode string
static public getEncryptionMode ( string $mode ) : integer
$mode string
return integer

getEncryptionObject() static public method

Returns a cipher object corresponding to a string
static public getEncryptionObject ( string $algo ) : string
$algo string
return 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

wrapPrivateKey() static public method

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

wrapPublicKey() static public method

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

Property Details

$defaultEncryptionAlgorithm static public property

Default encryption algorithm
static public string $defaultEncryptionAlgorithm
return string