added doga
This commit is contained in:
25
25_02_24/node_modules/@tinyhttp/cookie-signature/README.md
generated
vendored
Normal file
25
25_02_24/node_modules/@tinyhttp/cookie-signature/README.md
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
# @tinyhttp/cookie-signature
|
||||
|
||||
[](https://npmjs.com/package/@tinyhttp/cookie-signature) [](https://npmjs.com/package/@tinyhttp/cookie-signature)
|
||||
|
||||
HTTP cookie signing and unsigning. A rewrite of [cookie-signature](https://github.com/tj/node-cookie-signature) module.
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
pnpm i @tinyhttp/cookie-signature
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
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.
|
||||
Reference in New Issue
Block a user