public static function LockrEncryptionKeyType::generateKeyValue in Lockr 8.3
Same name and namespace in other branches
- 8.4 src/Plugin/KeyType/LockrEncryptionKeyType.php \Drupal\lockr\Plugin\KeyType\LockrEncryptionKeyType::generateKeyValue()
- 8.2 src/Plugin/KeyType/LockrEncryptionKeyType.php \Drupal\lockr\Plugin\KeyType\LockrEncryptionKeyType::generateKeyValue()
- 4.x src/Plugin/KeyType/LockrEncryptionKeyType.php \Drupal\lockr\Plugin\KeyType\LockrEncryptionKeyType::generateKeyValue()
Generate a key value of this type using the submitted configuration.
Parameters
array $configuration: The configuration for the key type plugin.
Return value
string The generated key value.
Overrides KeyTypeInterface::generateKeyValue
File
- src/
Plugin/ KeyType/ LockrEncryptionKeyType.php, line 132
Class
- LockrEncryptionKeyType
- Defines a key type for encryption that generates keys with Lockr.
Namespace
Drupal\lockr\Plugin\KeyTypeCode
public static function generateKeyValue(array $configuration) {
$key_size = $configuration['key_size'];
return \Drupal::service('lockr.lockr')
->generateKey((int) $key_size);
}