createSignedCookie method
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)}');
}