UNPKG

571 BTypeScriptView Raw
1// Type definitions for cookie-signature 1.0
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/** Sign the given `val` with `secret`. */
7export function sign(value: string, secret: string): string;
8
9/**
10 * Unsign and decode the given `val` with `secret`,
11 * returning `false` if the signature is invalid.
12 */
13export function unsign(value: string, secret: string): string | false;