ios-dev/comments/Home/node_modules/@tinyhttp/cookie-signature
Ernest Litvinenko 0066e66a47 Initial 2024-03-11 14:47:28 +03:00
..
dist Initial 2024-03-11 14:47:28 +03:00
LICENSE Initial 2024-03-11 14:47:28 +03:00
README.md Initial 2024-03-11 14:47:28 +03:00
package.json Initial 2024-03-11 14:47:28 +03:00

README.md

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