Files
InternetProg_MorozovDV_PIbd-22/Lab/node_modules/@tinyhttp/cookie-signature
2025-05-26 00:41:29 +04:00
..
2025-05-26 00:41:29 +04:00
2025-05-26 00:41:29 +04:00
2025-05-26 00:41:29 +04:00
2025-05-26 00:41:29 +04:00

@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.