# media-cloud-sync/1.2.2/includes/sdk/s3/Aws/S3/Crypto/CryptoParamsTraitV2.php

Media Cloud Sync, version 1.2.2. 17 lines.

- Page: https://pluginprobe.com/plugins/media-cloud-sync/1.2.2/code/includes/sdk/s3/Aws/S3/Crypto/CryptoParamsTraitV2.php
- Raw: https://pluginprobe.com/plugins/media-cloud-sync/1.2.2/raw/includes/sdk/s3/Aws/S3/Crypto/CryptoParamsTraitV2.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.2.2/code/includes/sdk/s3/Aws/S3/Crypto/CryptoParamsTraitV2.php#L10-L20`.

```php
<?php

namespace Dudlewebs\WPMCS\s3\Aws\S3\Crypto;

use Dudlewebs\WPMCS\s3\Aws\Crypto\MaterialsProviderInterfaceV2;
trait CryptoParamsTraitV2
{
    use CryptoParamsTrait;
    protected function getMaterialsProvider(array $args)
    {
        if ($args['@MaterialsProvider'] instanceof MaterialsProviderInterfaceV2) {
            return $args['@MaterialsProvider'];
        }
        throw new \InvalidArgumentException('An instance of MaterialsProviderInterfaceV2' . ' must be passed in the "MaterialsProvider" field.');
    }
}

```
