You are here

public static function LockrEncryptionKeyType::generateKeyValue in Lockr 4.x

Same name and namespace in other branches
  1. 8.4 src/Plugin/KeyType/LockrEncryptionKeyType.php \Drupal\lockr\Plugin\KeyType\LockrEncryptionKeyType::generateKeyValue()
  2. 8.2 src/Plugin/KeyType/LockrEncryptionKeyType.php \Drupal\lockr\Plugin\KeyType\LockrEncryptionKeyType::generateKeyValue()
  3. 8.3 src/Plugin/KeyType/LockrEncryptionKeyType.php \Drupal\lockr\Plugin\KeyType\LockrEncryptionKeyType::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\KeyType

Code

public static function generateKeyValue(array $configuration) {
  $key_size = $configuration['key_size'];
  return \Drupal::service('lockr.lockr')
    ->generateKey((int) $key_size);
}