function CryptTest::providerTestHmacBase64

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Component/Utility/CryptTest.php \Drupal\Tests\Component\Utility\CryptTest::providerTestHmacBase64()
  2. 10 core/tests/Drupal/Tests/Component/Utility/CryptTest.php \Drupal\Tests\Component\Utility\CryptTest::providerTestHmacBase64()
  3. 11.x core/tests/Drupal/Tests/Component/Utility/CryptTest.php \Drupal\Tests\Component\Utility\CryptTest::providerTestHmacBase64()

Provides data for self::testHmacBase64().

Return value

array Test data.

File

core/tests/Drupal/Tests/Component/Utility/CryptTest.php, line 91

Class

CryptTest
Tests random byte generation.

Namespace

Drupal\Tests\Component\Utility

Code

public function providerTestHmacBase64() {
    return [
        [
            'data' => 'Calculates a base-64 encoded, URL-safe sha-256 hmac.',
            'key' => 'secret-key',
            'expected_hmac' => '2AaH63zwjhekWZlEpAiufyfhAHIzbQhl9Hd9oCi3_c8',
        ],
    ];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.