1 | // Type definitions for cookie-signature 1.1
|
2 | // Project: https://github.com/tj/node-cookie-signature, https://github.com/visionmedia/node-cookie-signature
|
3 | // Definitions by: Junyoung Choi <https://github.com/Rokt33r>
|
4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5 |
|
6 | /// <reference types="node" />
|
7 |
|
8 | import type { CipherKey } from "node:crypto";
|
9 |
|
10 | /** Sign the given `val` with `secret`. */
|
11 | export function sign(value: string, secret: CipherKey): string;
|
12 |
|
13 | /**
|
14 | * Unsign and decode the given `val` with `secret`,
|
15 | * returning `false` if the signature is invalid.
|
16 | */
|
17 | export function unsign(value: string, secret: CipherKey): string | false;
|