| 1 |
<?php |
| 2 |
|
| 3 |
namespace Dudlewebs\WPMCS\s3\Aws\Crypto; |
| 4 |
|
| 5 |
interface MaterialsProviderInterfaceV2 |
| 6 |
{ |
| 7 |
/** |
| 8 |
* Returns if the requested size is supported by AES. |
| 9 |
* |
| 10 |
* @param int $keySize Size of the requested key in bits. |
| 11 |
* |
| 12 |
* @return bool |
| 13 |
*/ |
| 14 |
public static function isSupportedKeySize($keySize); |
| 15 |
/** |
| 16 |
* Returns the wrap algorithm name for this Provider. |
| 17 |
* |
| 18 |
* @return string |
| 19 |
*/ |
| 20 |
public function getWrapAlgorithmName(); |
| 21 |
/** |
| 22 |
* Takes an encrypted content encryption key (CEK) and material description |
| 23 |
* for use decrypting the key according to the Provider's specifications. |
| 24 |
* |
| 25 |
* @param string $encryptedCek Encrypted key to be decrypted by the Provider |
| 26 |
* for use decrypting other data. |
| 27 |
* @param string $materialDescription Material Description for use in |
| 28 |
* decrypting the CEK. |
| 29 |
* @param array $options Options for use in decrypting the CEK. |
| 30 |
* |
| 31 |
* @return string |
| 32 |
*/ |
| 33 |
public function decryptCek($encryptedCek, $materialDescription, $options); |
| 34 |
/** |
| 35 |
* @param string $keySize Length of a cipher key in bits for generating a |
| 36 |
* random content encryption key (CEK). |
| 37 |
* @param array $context Context map needed for key encryption |
| 38 |
* @param array $options Additional options to be used in CEK generation |
| 39 |
* |
| 40 |
* @return array |
| 41 |
*/ |
| 42 |
public function generateCek($keySize, $context, $options); |
| 43 |
/** |
| 44 |
* @param string $openSslName Cipher OpenSSL name to use for generating |
| 45 |
* an initialization vector. |
| 46 |
* |
| 47 |
* @return string |
| 48 |
*/ |
| 49 |
public function generateIv($openSslName); |
| 50 |
} |
| 51 |
|