public function getSecure($name = '')
    {
        $result = '';
        $cookie = Craft::$app->request->cookies->get($name);
        if ($cookie !== null) {
            try {
                $data = Craft::$app->security->validateData($cookie->value);
            } catch (InvalidConfigException $e) {
                Craft::error(
                    'Error getting secure cookie: '.$e->getMessage(),
                    __METHOD__
                );
                $data = false;
            } catch (Exception $e) {
                Craft::error(
                    'Error getting secure cookie: '.$e->getMessage(),
                    __METHOD__
                );
                $data = false;
            }
            if ($cookie
                && !empty($cookie->value)
                && $data !== false
            ) {
                $result = unserialize(base64_decode($data), ['allowed_classes' => false]);
            }
        }

        return $result;
    }