1 | export type BufferLike =
|
2 | | Buffer
|
3 | | string
|
4 | | Uint8Array
|
5 | | ArrayBuffer
|
6 | | SharedArrayBuffer
|
7 | | ReadonlyArray<number>
|
8 | | number[]
|
9 |
|
10 | export function xxh32(input: BufferLike, seed?: number): number
|
11 | export function xxh64(input: BufferLike, seed?: BigInt): BigInt
|
12 |
|
13 | export class Xxh32 {
|
14 | constructor(seed?: number)
|
15 | update(input: BufferLike): this
|
16 | digest(): number
|
17 | reset(): void
|
18 | }
|
19 |
|
20 | export class Xxh64 {
|
21 | constructor(seed?: BigInt)
|
22 | update(input: BufferLike): this
|
23 | digest(): BigInt
|
24 | reset(): void
|
25 | }
|
26 |
|
27 | export class Xxh3 {
|
28 | static withSeed(seed?: BigInt): Xxh3
|
29 | static withSecret(secret: BufferLike): Xxh3
|
30 | private constructor() {}
|
31 | update(input: BufferLike): this
|
32 | digest(): BigInt
|
33 | reset(): void
|
34 | }
|
35 |
|
36 | export const xxh3: {
|
37 | xxh64: (input: BufferLike, seed?: BigInt) => BigInt
|
38 | xxh64WithSecret: (input: BufferLike, secret: BufferLike) => BigInt
|
39 | xxh128: (input: BufferLike, seed?: BigInt) => BigInt
|
40 | xxh128WithSecret: (input: BufferLike, secret: BufferLike) => BigInt
|
41 | Xxh3: typeof Xxh3
|
42 | }
|