You are here

public function RestClient::encrypt in Salesforce Suite 8.3

Encrypts a value using the active encryption profile, or return plaintext.

Parameters

string $value: The value to encrypt.

Return value

string The encrypted value, or plaintext if no active profile.

Overrides EncryptedRestClientInterface::encrypt

5 calls to RestClient::encrypt()
RestClient::setAccessToken in modules/salesforce_encrypt/src/Rest/RestClient.php
Set the access token.
RestClient::setConsumerKey in modules/salesforce_encrypt/src/Rest/RestClient.php
Consumer key setter.
RestClient::setConsumerSecret in modules/salesforce_encrypt/src/Rest/RestClient.php
Consumer key setter.
RestClient::setIdentity in modules/salesforce_encrypt/src/Rest/RestClient.php
Set the Salesforce identity, which is stored in a variable.
RestClient::setRefreshToken in modules/salesforce_encrypt/src/Rest/RestClient.php
Set the refresh token.

File

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

Class

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

Namespace

Drupal\salesforce_encrypt\Rest

Code

public function encrypt($value) {
  if (empty($this
    ->doGetEncryptionProfile())) {
    return $value;
  }
  else {
    return $this->encryption
      ->encrypt($value, $this
      ->doGetEncryptionProfile());
  }
}