protected function TestDiscoveryCacheContext::hash in Drupal 8
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 core/
modules/ simpletest/ src/ Cache/ Context/ TestDiscoveryCacheContext.php - Returns the string representation of the cache context.
File
- core/
modules/ simpletest/ src/ Cache/ Context/ TestDiscoveryCacheContext.php, line 90
Class
- TestDiscoveryCacheContext
- Defines the TestDiscoveryCacheContext service.
Namespace
Drupal\simpletest\Cache\ContextCode
protected function hash($identifier) {
return hash('sha256', $this->privateKey
->get() . Settings::getHashSalt() . $identifier);
}