UNPKG

371 BTypeScriptView Raw
1/// <reference types="node" />
2
3import type { CipherKey } from "node:crypto";
4
5/** Sign the given `val` with `secret`. */
6export function sign(value: string, secret: CipherKey): string;
7
8/**
9 * Unsign and decode the given `val` with `secret`,
10 * returning `false` if the signature is invalid.
11 */
12export function unsign(value: string, secret: CipherKey): string | false;