forked from robertklep/node-metrohash
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.d.ts
More file actions
35 lines (25 loc) · 745 Bytes
/
index.d.ts
File metadata and controls
35 lines (25 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/// <reference types="node" />
interface MetroHasher {
// Update.
update(input: string | Buffer): this;
// Finalize and get hash digest.
digest(): string;
}
export class MetroHash64 implements MetroHasher {
// Constructor.
constructor(seed?: number);
// Update.
update(input: string | Buffer): this;
// Finalize and get hash digest.
digest(): string;
}
export class MetroHash128 implements MetroHasher {
// Constructor.
constructor(seed?: number);
// Update.
update(input: string | Buffer): this;
// Finalize and get hash digest.
digest(): string;
}
export function metrohash64(input: string | Buffer, seed?: number): string;
export function metrohash128(input: string | Buffer, seed?: number): string;