Return the decrypted string generated from the encrypt method.

@param string $data : The encrypted string

@return null|string : The decrypted string
768841
public function decrypt($data)
    {
        $this->cwsDebug->titleH2('Decrypt data');

        if (empty($this->encryptionKey)) {
            $this->error = 'You have to set the encryption key...';
            $this->cwsDebug->error($this->error);

            return;
        }

        if (empty($data)) {
            $this->error = 'Data empty...';
            $this->cwsDebug->error($this->error);

            return;
        }

        $this->cwsDebug->labelValue('Encryption key', $this->encryptionKey);
        $this->cwsDebug->dump('Encrypted data', strval($data));

        $result = null;
        $td = mcrypt_module_open(MCRYPT_BLOWFISH, '', MCRYPT_MODE_CFB, '');

        $ivsize = mcrypt_enc_get_iv_size($td);
        $iv = substr($data, 0, $ivsize);
        $key = $this->validateKey($this->encryptionKey, mcrypt_enc_get_key_size($td));

        if ($iv) {
            $data = substr($data, $ivsize);
            mcrypt_generic_init($td, $key, $iv);
            $decryptData = mdecrypt_generic($td, $data);
            $result = $this->decode($decryptData);
        }

        $this->cwsDebug->dump('Data', $result);

        return $result;
    }
1140663
private function decrypt(string $data)
  {
    $secret = explode(':', config('app.key'))[1];
    $secret = base64_decode($secret);

    return (new Encrypter($secret))->decrypt($data);
  }
330407
public function fromRawData($data)
    {
        $secretLength = VarInt::readUnsignedVarInt($data);
        $data = substr($data, $secretLength->getDataLength());

        $secretData = substr($data, 0, $secretLength->getValue());
        $data = substr($data, $secretLength->getValue());

        $verifyLength = VarInt::readUnsignedVarInt($data);
        $data = substr($data, $verifyLength->getDataLength());

        $verifyData = substr($data, 0, $verifyLength->getValue());

        $this->setToken($verifyData)->setSecret($secretData);
    }
833514
public function unConvert($data)
    {
        if (empty($data) || !is_string($data) || ($out = @unserialize($data)) === false)
            return null;

        if (!is_array($out) || empty($out))
            return null;

        return $out;
    }
759166
public static function decode($data)
    {
        $rData = strtr($data, '-_', '+/');
        $rMod4 = strlen($rData) % 4;
        if ($rMod4) {
            $rData .= substr('====', $rMod4);
        }
        return base64_decode($rData);
    }
1113101
protected function getString($data)/*# : string */
    {
        if (is_scalar($data)) {
            return strval($data);
        } elseif (is_array($data)) {
            return 'ARRAY[' . count($data) . ']';
        } elseif (is_object($data)) {
            return $this->getObjectString($data);
        } else {
            return 'TYPE: ' . gettype($data);
        }
    }
917928
public static function encode($data)
    {
        switch (gettype($data)) {
            case 'array':
                return self::encodeArray($data);
            case 'object':
                return self::encodeObject($data);
            case 'string':
                return self::encodeString($data);
            case 'integer':
                return self::encodeInteger($data);
            case 'boolean':
                return self::encodeBoolean($data);
            case 'double':
                return self::encodeDouble($data);
            case 'NULL':
                return self::encodeNull($data);
            case 'resource':
                // TODO
                break;
            default:
                throw new UnencodeableException('Contains unencodeable type', 3);
        }
    }
172865
private function decrypt($data)
	{
		$key = md5($this->_config['serverSecret']);
	    $x = 0;
	    $data = base64_decode($data);
	    $len = strlen($data);
	    $l = strlen($key);
	    for ($i = 0; $i < $len; $i++)
	    {
	        if ($x == $l) 
	        {
	            $x = 0;
	        }
	        $char .= substr($key, $x, 1);
	        $x++;
	    }
	    for ($i = 0; $i < $len; $i++)
	    {
	        if (ord(substr($data, $i, 1)) < ord(substr($char, $i, 1)))
	        {
	            $str .= chr((ord(substr($data, $i, 1)) + 256) - ord(substr($char, $i, 1)));
	        }
	        else
	        {
	            $str .= chr(ord(substr($data, $i, 1)) - ord(substr($char, $i, 1)));
	        }
	    }
	    return $str;
	}
980921
public function decrypt($data){
        $data = base64_decode($data);
        $maxlength = $this->getMaxDecryptBlockSize($this->privateKey);
        $output='';
        while(strlen($data)){
            $input = substr($data, 0, $maxlength);
            $data = substr($data, $maxlength);
            openssl_private_decrypt($input, $out, $this->privateKey);
            $output .= $out;
        }
        return $output;
    }
672388
protected function doDecrypt($data, $key)
    {
        $decrypted = '';

        // Convert the HEX input into an array of integers and get the number of characters.
        $chars = $this->hexToIntArray($data);

        // Make sure private key is as long as chars length
        $key = str_repeat($key, (int) ceil(count($chars) / strlen($key)));

        // Get the XOR values between the ASCII values of the input and key characters for all input offsets.
        foreach ($chars as $i => $char) {
            $decrypted .= chr($char ^ ord($key[$i]));
        }

        return $decrypted;
    }
344705
static public function decode($data)
	{
	    return json_decode($data, true) ? : ($data && $data!='\"\"' && $data !='false' ? $data : null);
	}
149177
public function encrypt(string $data): string
    {
        $this->throwExceptionIfKeyEmpty();

        $iv = \openssl_random_pseudo_bytes(\openssl_cipher_iv_length($this->method));
        $encrypted = \openssl_encrypt($data, $this->method, $this->key, 0, $iv);
        $data = \base64_encode($encrypted . '::' . $iv);

        return $data;
    }
1352776
function encryptSimple($data) {
		$result = '';
		for($i=0; $i<strlen($data); $i++) {
			$char = substr($data, $i, 1);
			$keychar = substr($this->encPassword, ($i % strlen($this->encPassword))-1, 1);
			$char = chr(ord($char)+ord($keychar));
			$result.=$char;
		}
		return str_replace(array('+', '/'), array('-', '_'),base64_encode($result));
	}
162059
public function decrypt($data)
    {
        return openssl_decrypt($data, $this->algorithm, $this->secret, 0, $this->iv);
    }
965301
public function decrypt($data) {
        //使用BASE64对需要解密的字符串进行解码
        $str = base64_decode($data);
        $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_128,MCRYPT_MODE_CBC),1);
        $encrypt_str =  mcrypt_decrypt(MCRYPT_RIJNDAEL_128, $this->key, $str, MCRYPT_MODE_CBC);
        $encrypt_str = trim($encrypt_str);
        $encrypt_str = $this->pkcs7UnPad($encrypt_str, $this->blockSize);
        return $encrypt_str;
    }
813594
private function encodeString($data = null)
    {
        $data = is_null($data) ? $this->data : $data;
        return sprintf("%d:%s", strlen($data), $data);
    }
834014
public function Decrypt($data, $key)
	{
		if ($data == null)
		{
			return null;
		}
		$iv = substr($data, 0, 16);
		$payload = substr($data, 16);
		return openssl_decrypt($payload, 'AES-256-CBC', base64_decode($key), OPENSSL_RAW_DATA|OPENSSL_ZERO_PADDING, $iv);
	}