# media-cloud-sync/1.0.3/includes/sdk/s3/Aws/Crypto/MaterialsProviderInterface.php

Media Cloud Sync, version 1.0.3. 58 lines.

- Page: https://pluginprobe.com/plugins/media-cloud-sync/1.0.3/code/includes/sdk/s3/Aws/Crypto/MaterialsProviderInterface.php
- Raw: https://pluginprobe.com/plugins/media-cloud-sync/1.0.3/raw/includes/sdk/s3/Aws/Crypto/MaterialsProviderInterface.php
- Modified: 2024-10-27T10:40:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/media-cloud-sync/1.0.3/code/includes/sdk/s3/Aws/Crypto/MaterialsProviderInterface.php#L10-L20`.

```php
<?php

namespace Dudlewebs\WPMCS\s3\Aws\Crypto;

interface MaterialsProviderInterface
{
    /**
     * Returns if the requested size is supported by AES.
     *
     * @param int $keySize Size of the requested key in bits.
     *
     * @return bool
     */
    public static function isSupportedKeySize($keySize);
    /**
     * Performs further initialization of the MaterialsProvider based on the
     * data inside the MetadataEnvelope.
     *
     * @param MetadataEnvelope $envelope A storage envelope for encryption
     *                                   metadata to be read from.
     *
     * @internal
     */
    public function fromDecryptionEnvelope(MetadataEnvelope $envelope);
    /**
     * Returns the wrap algorithm name for this Provider.
     *
     * @return string
     */
    public function getWrapAlgorithmName();
    /**
     * Takes an encrypted content encryption key (CEK) and material description
     * for use decrypting the key according to the Provider's specifications.
     *
     * @param string $encryptedCek Encrypted key to be decrypted by the Provider
     *                             for use decrypting other data.
     * @param string $materialDescription Material Description for use in
     *                                    encrypting the $cek.
     *
     * @return string
     */
    public function decryptCek($encryptedCek, $materialDescription);
    /**
     * @param string $keySize Length of a cipher key in bits for generating a
     *                        random content encryption key (CEK).
     *
     * @return string
     */
    public function generateCek($keySize);
    /**
     * @param string $openSslName Cipher OpenSSL name to use for generating
     *                            an initialization vector.
     *
     * @return string
     */
    public function generateIv($openSslName);
}

```
