@otterhttp/cookie-signature
v3.0.0
Published
HTTP cookie signing and unsigning
Downloads
48
Maintainers
Readme
@otterhttp/cookie-signature
HTTP cookie signing and unsigning. A rewrite of cookie-signature module.
Install
pnpm i @otterhttp/cookie-signature
API
import { sign, unsign } from '@otterhttp/cookie-signature'
sign(val, secret)
Signd the given val
with secret
.
unsign(val, secret)
Unsign and decode the given val
with secret
, returning false
if the signature is invalid.