public function CryptTest::providerTestHashBase64 in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Component/Utility/CryptTest.php \Drupal\Tests\Component\Utility\CryptTest::providerTestHashBase64()
Provides data for self::testHashBase64().
Return value
array Test data.
File
- core/
tests/ Drupal/ Tests/ Component/ Utility/ CryptTest.php, line 92 - Contains \Drupal\Tests\Component\Utility\CryptTest.
Class
- CryptTest
- Tests random byte generation.
Namespace
Drupal\Tests\Component\UtilityCode
public function providerTestHashBase64() {
return array(
array(
'data' => 'The SHA (Secure Hash Algorithm) is one of a number of cryptographic hash functions. A cryptographic hash is like a signature for a text or a data file. SHA-256 algorithm generates an almost-unique, fixed size 256-bit (32-byte) hash. Hash is a one way function – it cannot be decrypted back. This makes it suitable for password validation, challenge hash authentication, anti-tamper, digital signatures.',
'expectedHash' => '034rT6smZAVRxpq8O98cFFNLIVx_Ph1EwLZQKcmRR_s',
),
array(
'data' => 'SHA-256 is one of the successor hash functions to SHA-1, and is one of the strongest hash functions available.',
'expected_hash' => 'yuqkDDYqprL71k4xIb6K6D7n76xldO4jseRhEkEE6SI',
),
);
}