Cipher
11 months ago
Polyfill
11 months ago
AbstractCryptoClient.php
11 months ago
AbstractCryptoClientV2.php
11 months ago
AesDecryptingStream.php
11 months ago
AesEncryptingStream.php
11 months ago
AesGcmDecryptingStream.php
11 months ago
AesGcmEncryptingStream.php
11 months ago
AesStreamInterface.php
11 months ago
AesStreamInterfaceV2.php
11 months ago
DecryptionTrait.php
11 months ago
DecryptionTraitV2.php
11 months ago
EncryptionTrait.php
11 months ago
EncryptionTraitV2.php
11 months ago
KmsMaterialsProvider.php
11 months ago
KmsMaterialsProviderV2.php
11 months ago
MaterialsProvider.php
11 months ago
MaterialsProviderInterface.php
11 months ago
MaterialsProviderInterfaceV2.php
11 months ago
MaterialsProviderV2.php
11 months ago
MetadataEnvelope.php
11 months ago
MetadataStrategyInterface.php
11 months ago
MaterialsProviderInterface.php
62 lines
| 1 | <?php |
| 2 | namespace Aws\Crypto; |
| 3 | |
| 4 | interface MaterialsProviderInterface |
| 5 | { |
| 6 | /** |
| 7 | * Returns if the requested size is supported by AES. |
| 8 | * |
| 9 | * @param int $keySize Size of the requested key in bits. |
| 10 | * |
| 11 | * @return bool |
| 12 | */ |
| 13 | public static function isSupportedKeySize($keySize); |
| 14 | |
| 15 | /** |
| 16 | * Performs further initialization of the MaterialsProvider based on the |
| 17 | * data inside the MetadataEnvelope. |
| 18 | * |
| 19 | * @param MetadataEnvelope $envelope A storage envelope for encryption |
| 20 | * metadata to be read from. |
| 21 | * |
| 22 | * @internal |
| 23 | */ |
| 24 | public function fromDecryptionEnvelope(MetadataEnvelope $envelope); |
| 25 | |
| 26 | /** |
| 27 | * Returns the wrap algorithm name for this Provider. |
| 28 | * |
| 29 | * @return string |
| 30 | */ |
| 31 | public function getWrapAlgorithmName(); |
| 32 | |
| 33 | /** |
| 34 | * Takes an encrypted content encryption key (CEK) and material description |
| 35 | * for use decrypting the key according to the Provider's specifications. |
| 36 | * |
| 37 | * @param string $encryptedCek Encrypted key to be decrypted by the Provider |
| 38 | * for use decrypting other data. |
| 39 | * @param string $materialDescription Material Description for use in |
| 40 | * encrypting the $cek. |
| 41 | * |
| 42 | * @return string |
| 43 | */ |
| 44 | public function decryptCek($encryptedCek, $materialDescription); |
| 45 | |
| 46 | /** |
| 47 | * @param string $keySize Length of a cipher key in bits for generating a |
| 48 | * random content encryption key (CEK). |
| 49 | * |
| 50 | * @return string |
| 51 | */ |
| 52 | public function generateCek($keySize); |
| 53 | |
| 54 | /** |
| 55 | * @param string $openSslName Cipher OpenSSL name to use for generating |
| 56 | * an initialization vector. |
| 57 | * |
| 58 | * @return string |
| 59 | */ |
| 60 | public function generateIv($openSslName); |
| 61 | } |
| 62 |