HTTP cookie signing and unsigning. A rewrite of cookie-signature module.
pnpm i @tinyhttp/cookie-signature
import { sign, unsign } from '@tinyhttp/cookie-signature'
Signd the given val
with secret
.
Unsign and decode the given val
with secret
, returning false
if the signature is invalid.