Google\Cloud\Tests\Storage\EncryptionTraitTest::encryptionProvider PHP Method

encryptionProvider() public method

public encryptionProvider ( )
    public function encryptionProvider()
    {
        $key = base64_encode('abcd');
        $hash = base64_encode(hash('SHA256', base64_decode($key), true));
        $destinationKey = base64_encode('efgh');
        $destinationHash = base64_encode(hash('SHA256', base64_decode($destinationKey), true));
        return [[['httpOptions' => ['headers' => $this->getEncryptionHeaders($key, $hash)]], ['encryptionKey' => $key, 'encryptionKeySHA256' => $hash]], [['httpOptions' => ['headers' => $this->getEncryptionHeaders($key, $hash)]], ['encryptionKey' => $key]], [['httpOptions' => ['headers' => array_merge($this->getEncryptionHeaders($destinationKey, $destinationHash), $this->getCopySourceEncryptionHeaders($key, $hash))]], ['useCopySourceHeaders' => true, 'encryptionKey' => $key, 'encryptionKeySHA256' => $hash, 'destinationEncryptionKey' => $destinationKey, 'destinationEncryptionKeySHA256' => $destinationHash]], [['httpOptions' => ['headers' => $this->getEncryptionHeaders($key, $hash) + ['hey' => 'dont clobber me']]], ['encryptionKey' => $key, 'encryptionKeySHA256' => $hash, 'httpOptions' => ['headers' => ['hey' => 'dont clobber me']]]]];
    }