PHP 7.4.33
Preview: MaterialsProviderV2.php Size: 2.07 KB
/home/godevadmin/www/admin/vendor/aws/Aws/Crypto/MaterialsProviderV2.php

<?php
namespace Aws\Crypto;

abstract class MaterialsProviderV2 implements MaterialsProviderInterfaceV2
{
    private static $supportedKeySizes = [
        128 => true,
        256 => true,
    ];

    /**
     * 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)
    {
        return isset(self::$supportedKeySizes[$keySize]);
    }

    /**
     * Returns the wrap algorithm name for this Provider.
     *
     * @return string
     */
    abstract 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
     *                                    decrypting the CEK.
     * @param string $options Options for use in decrypting the CEK.
     *
     * @return string
     */
    abstract public function decryptCek($encryptedCek, $materialDescription, $options);

    /**
     * @param string $keySize Length of a cipher key in bits for generating a
     *                        random content encryption key (CEK).
     * @param array $context Context map needed for key encryption
     * @param array $options Additional options to be used in CEK generation
     *
     * @return array
     */
    abstract public function generateCek($keySize, $context, $options);

    /**
     * @param string $openSslName Cipher OpenSSL name to use for generating
     *                            an initialization vector.
     *
     * @return string
     */
    public function generateIv($openSslName)
    {
        return openssl_random_pseudo_bytes(
            openssl_cipher_iv_length($openSslName)
        );
    }
}

Directory Contents

Dirs: 2 × Files: 20

Name Size Perms Modified Actions
Cipher DIR
- drwxrwxr-x 2024-06-18 20:10:10
Edit Download
Polyfill DIR
- drwxrwxr-x 2024-06-18 20:10:10
Edit Download
4.11 KB lrwxrwxr-x 2024-06-18 20:10:08
Edit Download
4.00 KB lrwxrwxr-x 2024-06-18 20:10:08
Edit Download
3.63 KB lrwxrwxr-x 2024-06-18 20:10:08
Edit Download
3.80 KB lrwxrwxr-x 2024-06-18 20:10:08
Edit Download
2.61 KB lrwxrwxr-x 2024-06-18 20:10:08
Edit Download
2.82 KB lrwxrwxr-x 2024-06-18 20:10:08
Edit Download
686 B lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
759 B lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
6.14 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
9.29 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
7.05 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
7.24 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
4.01 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
3.53 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
3.33 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
1.87 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
1.72 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
2.07 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
1.70 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download
1.00 KB lrwxrwxr-x 2024-06-18 20:10:10
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).