UNPKG

617 BTypeScriptView Raw
1// Type definitions for keygrip 1.0
2// Project: https://github.com/crypto-utils/keygrip
3// Definitions by: jKey Lu <https://github.com/jkeylu>
4// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
5
6interface Keygrip {
7 sign(data: any): string;
8 verify(data: any, digest: string): boolean;
9 index(data: any, digest: string): number;
10}
11
12interface KeygripFunction {
13 new (keys: ReadonlyArray<string>, algorithm?: string, encoding?: string): Keygrip;
14 (keys: ReadonlyArray<string>, algorithm?: string, encoding?: string): Keygrip;
15}
16
17declare const Keygrip: KeygripFunction;
18
19export = Keygrip;