You are here

public function MCrypt::decrypt in DRD Agent 8.3

Same name and namespace in other branches
  1. 4.0.x src/Crypt/Method/MCrypt.php \Drupal\drd_agent\Crypt\Method\MCrypt::decrypt()

Decode, decrypt and unserialize arguments from the other end.

Parameters

string $body: The encrypted, serialized and encoded string to process.

string $iv: The initialiation vector.

Return value

mixed The decoded, decrypted and unserialized arguments.

Overrides BaseMethodInterface::decrypt

File

src/Crypt/Method/MCrypt.php, line 101

Class

MCrypt
Provides MCrypt encryption functionality.

Namespace

Drupal\drd_agent\Crypt\Method

Code

public function decrypt($body, $iv) {
  $this->iv = $iv;

  /** @noinspection UnserializeExploitsInspection */
  return unserialize(mcrypt_decrypt($this->cipher, $this
    ->getPassword(), $body, $this->mode, $this->iv));
}