src/Auth/CookieAuth.php
function get($params, $deCode = false)
    {
        if (false !== strpos($params, ':') && $deCode) {
            list($name, $arrKey) = explode(':', $params);
        } else {
            $name = $params;
        }

        if (!isset($_COOKIE[$name])) {
            return false;
        }

        $value = $_COOKIE[$name];
        $encryptKey = $this->getEncryptKey($name);
        $result = Helper::authCode($value, 'DECODE', $encryptKey);
        if (!$result) {
            return false;
        }

        if ($deCode) {
            $result = json_decode($result, true);
            if (isset($arrKey) && isset($result[$arrKey])) {
                return $result[$arrKey];
            }
        }

        return $result;
    }
function get($params, $deCode = false)
    {
        if (false !== strpos($params, ':') && $deCode) {
            list($name, $arrKey) = explode(':', $params);
        } else {
            $name = $params;
        }

        if (!isset($_COOKIE[$name])) {
            return false;
        }

        $value = $_COOKIE[$name];
        $encryptKey = $this->getEncryptKey($name);
        $result = Helper::authCode($value, 'DECODE', $encryptKey);
        if (!$result) {
            return false;
        }

        if ($deCode) {
            $result = json_decode($result, true);
            if (isset($arrKey) && isset($result[$arrKey])) {
                return $result[$arrKey];
            }
        }

        return $result;
    }
从已加密的cookie中取出值

@param string $params cookie的key
@param bool $deCode
@return bool|string