UNPKG

1.05 kBMarkdownView Raw
1# Installation
2> `npm install --save @types/cookie-signature`
3
4# Summary
5This package contains type definitions for cookie-signature (https://github.com/tj/node-cookie-signature).
6
7# Details
8Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-signature.
9## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/cookie-signature/index.d.ts)
10````ts
11/// <reference types="node" />
12
13import type { CipherKey } from "node:crypto";
14
15/** Sign the given `val` with `secret`. */
16export function sign(value: string, secret: CipherKey): string;
17
18/**
19 * Unsign and decode the given `val` with `secret`,
20 * returning `false` if the signature is invalid.
21 */
22export function unsign(value: string, secret: CipherKey): string | false;
23
24````
25
26### Additional Details
27 * Last updated: Mon, 06 Nov 2023 22:41:05 GMT
28 * Dependencies: [@types/node](https://npmjs.com/package/@types/node)
29
30# Credits
31These definitions were written by [Junyoung Choi](https://github.com/Rokt33r).
32
\No newline at end of file