Sign the provided cookie name and value in-place using HMAC.
The returned value will be 'HMAC(checksum_type, name + HMAC(checksum_type, value)) + value' suitable for a cookie value which can the be verified with VSGI.CookieUtils.verify.
CookieUtils.sign (cookie, ChecksumType.SHA512, "super-secret".data);
cookie |
cookie to sign |
checksum_type |
hash algorithm used to compute the HMAC |
key |
secret used to sign the cookie name and value |