You are here

private function WebformContentCreatorEntity::getDecryptionFromProfile in Webform Content Creator 2.x

Same name and namespace in other branches
  1. 8 src/Entity/WebformContentCreatorEntity.php \Drupal\webform_content_creator\Entity\WebformContentCreatorEntity::getDecryptionFromProfile()
  2. 3.x src/Entity/WebformContentCreatorEntity.php \Drupal\webform_content_creator\Entity\WebformContentCreatorEntity::getDecryptionFromProfile()

Get decrypted value with the configured encryption profile.

Parameters

string $value: Encrypted value.

string $encryptionProfile: Encryption profile name.

Return value

string Encryption profile used to encrypt/decrypt $value

1 call to WebformContentCreatorEntity::getDecryptionFromProfile()
WebformContentCreatorEntity::mapContentField in src/Entity/WebformContentCreatorEntity.php
Use a single mapping to set a Content field value.

File

src/Entity/WebformContentCreatorEntity.php, line 341

Class

WebformContentCreatorEntity
Defines the Webform Content Creator entity.

Namespace

Drupal\webform_content_creator\Entity

Code

private function getDecryptionFromProfile($value, $encryptionProfile = '') {
  if ($this
    ->getEncryptionCheck()) {
    $decValue = WebformContentCreatorUtilities::getDecryptedValue($value, $encryptionProfile);
  }
  else {
    $decValue = $value;
  }
  return $decValue;
}