public function TcaSettingsManager::generateToken in Token Content Access 2.0.x
Same name and namespace in other branches
- 8 src/TcaSettingsManager.php \Drupal\tca\TcaSettingsManager::generateToken()
Generate a token value.
Return value
string 64 length string.
File
- src/
TcaSettingsManager.php, line 159
Class
- TcaSettingsManager
- Class TcaSettingsManager.
Namespace
Drupal\tcaCode
public function generateToken($entity_type_id, $entity_id) {
$private_key = \Drupal::service('private_key')
->get();
$hash_salt = Settings::getHashSalt();
return Crypt::hashBase64($entity_type_id . $entity_id . microtime(), $private_key . $hash_salt);
}