Class MaterialsProvider
- Aws\Crypto\MaterialsProvider implements Aws\Crypto\MaterialsProviderInterface
- Abstract class
- Namespace: Aws\Crypto
- Located at Crypto/MaterialsProvider.php
Direct known subclasses
Methods Summary
-
static
isSupportedKeySize ( int $keySize )
Returns if the requested size is supported by AES.
-
abstract
getMaterialsDescription ( )
Returns the material description for this Provider so it can be verified by encryption mechanisms.
-
abstract
getWrapAlgorithmName ( )
Returns the wrap algorithm name for this Provider.
-
abstract
encryptCek ( string $unencryptedCek, string $materialDescription )
Takes a content encryption key (CEK) and description to return an encrypted key according to the Provider's specifications.
-
abstract
decryptCek ( string $encryptedCek, string $materialDescription )
Takes an encrypted content encryption key (CEK) and material description for use decrypting the key according to the Provider's specifications.
- generateCek ( string $keySize )
- generateIv ( string $openSslName )
Methods Details
static boolean isSupportedKeySize ( integer $keySize )
Returns if the requested size is supported by AES.
Parameters
integer | $keySize | Size of the requested key in bits. |
Returns
boolean |
Implementation of
abstract string getMaterialsDescription ( )
Returns the material description for this Provider so it can be verified by encryption mechanisms.
Returns
string |
abstract string getWrapAlgorithmName ( )
Returns the wrap algorithm name for this Provider.
Returns
string |
Implementation of
abstract string encryptCek ( string $unencryptedCek, string $materialDescription )
Takes a content encryption key (CEK) and description to return an encrypted key according to the Provider's specifications.
Parameters
string | $unencryptedCek | Key for use in encrypting other data that itself needs to be encrypted by the Provider. |
string | $materialDescription | Material Description for use in encrypting the $cek. |
Returns
string |
abstract string decryptCek ( string $encryptedCek, string $materialDescription )
Takes an encrypted content encryption key (CEK) and material description for use decrypting the key according to the Provider's specifications.
Parameters
string | $encryptedCek | Encrypted key to be decrypted by the Provider for use decrypting other data. |
string | $materialDescription | Material Description for use in encrypting the $cek. |
Returns
string |
Implementation of
string generateCek ( string $keySize )
Parameters
string | $keySize | Length of a cipher key in bits for generating a random content encryption key (CEK). |
Returns
string |
Implementation of
string generateIv ( string $openSslName )
Parameters
string | $openSslName | Cipher OpenSSL name to use for generating an initialization vector. |
Returns
string |