Documentation

MaterialsProvider
in package
implements MaterialsProviderInterface

Interfaces, Classes and Traits

MaterialsProviderInterface

Table of Contents

$supportedKeySizes  : mixed
decryptCek()  : string
Takes an encrypted content encryption key (CEK) and material description for use decrypting the key according to the Provider's specifications.
encryptCek()  : string
Takes a content encryption key (CEK) and description to return an encrypted key according to the Provider's specifications.
generateCek()  : string
generateIv()  : string
getMaterialsDescription()  : string
Returns the material description for this Provider so it can be verified by encryption mechanisms.
getWrapAlgorithmName()  : string
Returns the wrap algorithm name for this Provider.
isSupportedKeySize()  : bool
Returns if the requested size is supported by AES.

Properties

$supportedKeySizes

private static mixed $supportedKeySizes = [128 => true, 192 => true, 256 => true]

Methods

decryptCek()

Takes an encrypted content encryption key (CEK) and material description for use decrypting the key according to the Provider's specifications.

public abstract decryptCek(string $encryptedCek, string $materialDescription) : string
Parameters
$encryptedCek : string

Encrypted key to be decrypted by the Provider for use decrypting other data.

$materialDescription : string

Material Description for use in encrypting the $cek.

Return values
string —

encryptCek()

Takes a content encryption key (CEK) and description to return an encrypted key according to the Provider's specifications.

public abstract encryptCek(string $unencryptedCek, string $materialDescription) : string
Parameters
$unencryptedCek : string

Key for use in encrypting other data that itself needs to be encrypted by the Provider.

$materialDescription : string

Material Description for use in encrypting the $cek.

Return values
string —

generateCek()

public generateCek(string $keySize) : string
Parameters
$keySize : string

Length of a cipher key in bits for generating a random content encryption key (CEK).

Return values
string —

generateIv()

public generateIv(string $openSslName) : string
Parameters
$openSslName : string

Cipher OpenSSL name to use for generating an initialization vector.

Return values
string —

getMaterialsDescription()

Returns the material description for this Provider so it can be verified by encryption mechanisms.

public abstract getMaterialsDescription() : string
Return values
string —

getWrapAlgorithmName()

Returns the wrap algorithm name for this Provider.

public abstract getWrapAlgorithmName() : string
Return values
string —

isSupportedKeySize()

Returns if the requested size is supported by AES.

public static isSupportedKeySize(int $keySize) : bool
Parameters
$keySize : int

Size of the requested key in bits.

Return values
bool —

Search results