npm.io
2.1.2 • Published 2 weeks ago

@tinyhttp/cookie-signature

Licence
MIT
Version
2.1.2
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
2.9K

@tinyhttp/cookie-signature

npm (scoped) npm

HTTP cookie signing and unsigning. A rewrite of cookie-signature module.

Install

pnpm i @tinyhttp/cookie-signature

API

import { sign, unsign } from '@tinyhttp/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.

Keywords