protected function GroupPermissionsHashGenerator::hash in Group 8
Same name and namespace in other branches
- 2.0.x src/Access/GroupPermissionsHashGenerator.php \Drupal\group\Access\GroupPermissionsHashGenerator::hash()
Hashes the given string.
Parameters
string $identifier: The string to be hashed.
Return value
string The hash.
1 call to GroupPermissionsHashGenerator::hash()
- GroupPermissionsHashGenerator::generateHash in src/
Access/ GroupPermissionsHashGenerator.php - Generates a hash for an account's complete group permissions.
File
- src/
Access/ GroupPermissionsHashGenerator.php, line 120
Class
- GroupPermissionsHashGenerator
- Generates and caches the permissions hash for a group membership.
Namespace
Drupal\group\AccessCode
protected function hash($identifier) {
return hash('sha256', $this->privateKey
->get() . Settings::getHashSalt() . $identifier);
}