function TestDiscoveryCacheContext::hash
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.