protected function OgRoleCacheContext::hash in Organic groups 8
Hashes the given string.
Parameters
string $identifier: The string to be hashed.
Return value
string The hash.
1 call to OgRoleCacheContext::hash()
- OgRoleCacheContext::getContext in src/
Cache/ Context/ OgRoleCacheContext.php - Returns the string representation of the cache context.
File
- src/
Cache/ Context/ OgRoleCacheContext.php, line 155
Class
- OgRoleCacheContext
- Defines a cache context service for the OG roles of the current user.
Namespace
Drupal\og\Cache\ContextCode
protected function hash($identifier) {
return hash('sha256', $this->privateKey
->get() . Settings::getHashSalt() . $identifier);
}