createSignedCookie method

Cookie createSignedCookie(
  1. Cookie cookie
)

Returns a new cookie, replacing the value of an input cookie with one that is signed with the hmac.

The new value is: cookie.value + "." + base64Url(sig)

Where sig is the cookie's value, signed with the hmac.

Implementation

Cookie createSignedCookie(Cookie cookie) {
  return cookieWithNewValue(
      cookie, '${cookie.value}.${computeCookieSignature(cookie.value)}');
}