You are here

public function RestClient::decrypt in Salesforce Suite 8.3

Decrypts a value using active encryption profile, or return the same value.

Parameters

string $value: The value to decrypt.

Return value

string The decrypted value, or the unchanged value if no active profile.

Overrides EncryptedRestClientInterface::decrypt

5 calls to RestClient::decrypt()
RestClient::getAccessToken in modules/salesforce_encrypt/src/Rest/RestClient.php
Get the access token.
RestClient::getConsumerKey in modules/salesforce_encrypt/src/Rest/RestClient.php
Consumer key getter.
RestClient::getConsumerSecret in modules/salesforce_encrypt/src/Rest/RestClient.php
Comsumer secret getter.
RestClient::getIdentity in modules/salesforce_encrypt/src/Rest/RestClient.php
Return the Salesforce identity, which is stored in a variable.
RestClient::getRefreshToken in modules/salesforce_encrypt/src/Rest/RestClient.php
Get refresh token.

File

modules/salesforce_encrypt/src/Rest/RestClient.php, line 217

Class

RestClient
Objects, properties, and methods to communicate with the Salesforce REST API.

Namespace

Drupal\salesforce_encrypt\Rest

Code

public function decrypt($value) {
  if (empty($this
    ->doGetEncryptionProfile()) || empty($value) || mb_strlen($value) === 0) {
    return $value;
  }
  else {
    return $this->encryption
      ->decrypt($value, $this
      ->doGetEncryptionProfile());
  }
}