Decrypt the given value.

@param  mixed  $payload
@param  bool  $unserialize
@return string

@throws \Illuminate\Contracts\Encryption\DecryptException
436259
public function decrypt($payload, $unserialize = false)
    {
        $payload = $this->getJsonPayload($payload);
        if(hst_message_verify($payload)) {
            return $payload;
        }

        $iv = base64_decode($payload['iv']);

        // Here we will decrypt the value. If we are able to successfully decrypt it
        // we will then unserialize it and return it out to the caller. If we are
        // unable to decrypt this value we will throw out an exception message.
        $decrypted = \openssl_decrypt(
            $payload['value'], $this->cipher, $this->key, 0, $iv
        );

        if ($decrypted === false) {
            //throw new DecryptException('Could not decrypt the data.');
            return hst_message('Could not decrypt the data.', 'error');
        }
        if(isset($payload['sl'])) {
            $unserialize = $payload['sl'];
        }
        return $unserialize ? unserialize($decrypted) : $decrypted;
    }
1328321
public static function decrypt($data, $key = null)
    {
        is_null($key) && $key = Config::get('auth_key');
        return unserialize(self::cry($data, 2, $key));
    }
270523
public function decryptByPublicKey_data($data, $publickey = '')
	{
		$RSACrypt = new RSACrypt();

		if ($publickey != "") {
			$RSACrypt->pubkey = $publickey;
		}
		$decrypt_res = "";
		$datas = explode('@', $data);
		foreach ($datas as $value) {
			$decrypt_res = $decrypt_res . $RSACrypt->decryptByPublicKey($value);
		}
		return $decrypt_res;
	}
1334115
protected function decrypt($token)
    {
        // Decrypt the token if there is an Encrypter instance
        if ($this->encrypter instanceof Encrypter) {
            $token = $this->encrypter->decrypt($token);
        }
        
        // Return the unserialized token
        return @unserialize($token);
    }
1036893
function decrypt($ciphertext)
    {
        if ($this->k <= 0) {
            return false;
        }

        $ciphertext = str_split($ciphertext, $this->k);
        $ciphertext[count($ciphertext) - 1] = str_pad($ciphertext[count($ciphertext) - 1], $this->k, chr(0), STR_PAD_LEFT);

        $plaintext = '';

        switch ($this->encryptionMode) {
            case self::ENCRYPTION_NONE:
                $decrypt = '_raw_encrypt';
                break;
            case self::ENCRYPTION_PKCS1:
                $decrypt = '_rsaes_pkcs1_v1_5_decrypt';
                break;
            //case self::ENCRYPTION_OAEP:
            default:
                $decrypt = '_rsaes_oaep_decrypt';
        }

        foreach ($ciphertext as $c) {
            $temp = $this->$decrypt($c);
            if ($temp === false) {
                return false;
            }
            $plaintext.= $temp;
        }

        return $plaintext;
    }
397719
public function decode(string $data)
    {
        if (serialize(false) == $data) {
            return false;
        } elseif (false !== ($ret = @unserialize($data))) {
            return $ret;
        } else {
            throw new DecodeException('unserialize() error');
        }
    }
816413
public function unserialize($serialized)
    {
        $data = Json::decode($serialized);

        foreach (['token', 'cookie_token'] as $key) {
            if (!array_key_exists($key, $data)) {
                throw new SecurityException("Unserialized CSRF token doesn't contain required \"{$key}\" key");
            }
        }

        $this->token = $data['token'];
        $this->cookieToken = $data['cookie_token'];
    }
851028
public function unserialize($serialized)
	{
		$this->tokens = [];

		$tokenFactory = $this->getTokenFactory();
		$it = new SerializedTokenIterator(json_decode($serialized, true));

		$this->preUnserialize($it);

		while($it->valid())
		{
			$this->tokens[] = $tokenFactory->createToken($it);
		}

		$this->postUnserialize($it);
	}
750148
public function unserialize($serialized)
    {
        $unserialized = unserialize($serialized);

        $this->amount = $unserialized['amount'];
        $this->currency = unserialize($unserialized['currency']);
    }
1173344
public function unserialize($serialized)
    {
        $data = unserialize($serialized);
        $data = array_merge($data, array_fill(0, 2, null));

        list(
            $this->password,
            $this->username,
            $this->id
        ) = $data;
    }
2052
public function decrypt(string $value, string $key, bool $base64 = false)
    {
        if ($base64) {
            $value = base64_decode($value);
        }
        $ret = $this->decryptBinary($value, $key);
        return unserialize($ret);
    }
375616
private static function serializePayload($payload = '') : string
    {
        // If the payload is already JSON, return it
        if (\is_string($payload)) {
            return $payload;
        }

        $data = '';

        if (!empty($payload)) {
            $data = \json_encode($payload, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE | JSON_PRESERVE_ZERO_FRACTION);
        }

        return $data;
    }
49873
public function decode($encodedValue)
    {
        $encryptedValue = base64_decode($encodedValue);
        $value = $this->getEncryptor()->decrypt($encryptedValue);

        return $value;
    }
1300340
public static function decode($input, $serialized = false)
    {
        // use Base64 encoding to workaround issues with invalid
        // or null characters in serialized string (#1489142)
        if ($serialized) {
            // Keep backward compatybility where base64 wasn't used
            if (strpos(substr($input, 0, 16), ':') !== false) {
                return self::decode(@unserialize($input));
            }

            return @unserialize(base64_decode($input));
        }

        if (is_object($input)) {
            foreach (get_object_vars($input) as $idx => $value) {
                $input->$idx = self::decode($value);
            }
            return $input;
        }
        else if (is_array($input)) {
            foreach ($input as $idx => $value) {
                $input[$idx] = self::decode($value);
            }
            return $input;
        }

        return utf8_decode($input);
    }
1296380
public function unserialize($serialized) {
		$arr = \unserialize($serialized);
		$this->_Value = $arr[0];
		$this->_Encoding = $arr[1];
	}
311537
public function unserialize($serialized)
    {
        list($this->messages, $this->isValid) = json_decode($serialized, true);
    }
849785
public static function unserialize($serialized)
    {
        // Set Handle
        set_error_handler(function () {
        }, E_ALL);
        $result = unserialize((string) $serialized);
        // Restores the previous error handler function
        restore_error_handler();
        if ($result === false) {
            return false;
        }
        return $result;
    }