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 |
|
6 | interface Keygrip {
|
7 | sign(data: any): string;
|
8 | verify(data: any, digest: string): boolean;
|
9 | index(data: any, digest: string): number;
|
10 | }
|
11 |
|
12 | interface KeygripFunction {
|
13 | new (keys: ReadonlyArray<string>, algorithm?: string, encoding?: string): Keygrip;
|
14 | (keys: ReadonlyArray<string>, algorithm?: string, encoding?: string): Keygrip;
|
15 | }
|
16 |
|
17 | declare const Keygrip: KeygripFunction;
|
18 |
|
19 | export = Keygrip;
|