/** * @param Cookie $cookie * @return Cookie */ private function encodeCookie(Cookie $cookie) { if ($this->httpConfig->cookieProtection() == HttpConfig::COOKIE_ENCRYPT) { return $cookie->withValue($this->encrypter()->encrypt($cookie->getValue())); } //VALUE.HMAC return $cookie->withValue($cookie->getValue() . $this->hmacSign($cookie->getValue())); }
/** * @param Cookie $cookie * @return Cookie */ private function encodeCookie(Cookie $cookie) { if ($this->config['method'] == self::ENCRYPT) { return $cookie->withValue($this->encrypter()->encrypt($cookie->getValue())); } //MAC return $cookie->withValue($cookie->getValue() . $this->hmacSign($cookie->getValue())); }