You are here

protected function TestDiscoveryCacheContext::hash in SimpleTest 8.3

Hashes the given string.

Parameters

string $identifier: The string to be hashed.

Return value

string The hash.

1 call to TestDiscoveryCacheContext::hash()
TestDiscoveryCacheContext::getContext in src/Cache/Context/TestDiscoveryCacheContext.php
Returns the string representation of the cache context.

File

src/Cache/Context/TestDiscoveryCacheContext.php, line 90

Class

TestDiscoveryCacheContext
Defines the TestDiscoveryCacheContext service.

Namespace

Drupal\simpletest\Cache\Context

Code

protected function hash($identifier) {
  return hash('sha256', $this->privateKey
    ->get() . Settings::getHashSalt() . $identifier);
}