mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
22 lines
677 B
TypeScript
22 lines
677 B
TypeScript
// Type definitions for cookie-signature 1.0
|
|
// Project: https://github.com/tj/node-cookie-signature
|
|
// Definitions by: François Nguyen <https://github.com/lith-light-g>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
/**
|
|
* Sign the given `val` with `secret`.
|
|
* @param {string} val
|
|
* @param {string} secret
|
|
* @return {string}
|
|
*/
|
|
export function sign(value: string, secret: string): string;
|
|
|
|
/**
|
|
* Unsign and decode the given `val` with `secret`,
|
|
* returning `false` if the signature is invalid.
|
|
* @param {string} val
|
|
* @param {string} secret
|
|
* @return {string|boolean}
|
|
*/
|
|
export function unsign(value: string, secret: string): string | boolean;
|