/** * Loads an encryption profile key. * * @param \Drupal\encrypt\Entity\EncryptionProfile $encryption_profile * The encryption profile to use. * * @return string * The encryption key value. */ protected function loadEncryptionProfileKey(EncryptionProfile $encryption_profile) { $key_id = $encryption_profile->getEncryptionKey(); return $this->keyRepository->getKey($key_id)->getKeyValue(); }
/** * Loads an encryption profile key. * @param \Drupal\encrypt\Entity\EncryptionProfile $enc_profile */ private function loadEncryptionProfileKey($enc_profile) { // Load the key. $key_id = $enc_profile->getEncryptionKey(); return $this->key->getKey($key_id)->getKeyValue(); }