public function setEncryptedCookie($name, $value, $expires = null, $path = null, $domain = null, $secure = null, $httponly = null)
    {
        $expires = is_null($expires) ? $this->config('cookies.lifetime') : $expires;
        if (is_string($expires)) {
            $expires = strtotime($expires);
        }
        $secureValue = \Slim\Http\Util::encodeSecureCookie(
            $value,
            $expires,
            $this->config('cookies.secret_key'),
            $this->config('cookies.cipher'),
            $this->config('cookies.cipher_mode')
        );
        $this->setCookie($name, $secureValue, $expires, $path, $domain, $secure, $httponly);
    }