src/Leevel/Encryption/Encryption.php
protected function decryptData(string $value)
    {
        if (false === ($value = base64_decode($value, true))) {
            return false;
        }

        if (false === ($value = $this->unpackDataWithIv($value))) {
            return false;
        }

        $data = openssl_decrypt(
            $value['value'], $this->cipher, $this->key, OPENSSL_RAW_DATA, $value['iv']
        );

        if (false === $data) {
            throw new InvalidArgumentException('Decrypt the data failed.');
        }

        return [$data, base64_encode($value['iv'])];
    }
protected function decryptData(string $value)
    {
        if (false === ($value = base64_decode($value, true))) {
            return false;
        }

        if (false === ($value = $this->unpackDataWithIv($value))) {
            return false;
        }

        $data = openssl_decrypt(
            $value['value'], $this->cipher, $this->key, OPENSSL_RAW_DATA, $value['iv']
        );

        if (false === $data) {
            throw new InvalidArgumentException('Decrypt the data failed.');
        }

        return [$data, base64_encode($value['iv'])];
    }
解密数据.

@param string $value

@return array|bool