-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathblake2s.d.ts
29 lines (25 loc) · 841 Bytes
/
blake2s.d.ts
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
export as namespace BLAKE2s;
export type ByteArray = number[] | Uint8Array;
export default class BLAKE2s {
constructor(digestLength?: number);
constructor(digestLength: number | undefined, key: ByteArray);
constructor(digestLength: number | undefined, config: BLAKE2sConfig);
update(p: ByteArray, offset?: number, length?: number): this;
digest(): Uint8Array;
hexDigest(): string;
static readonly digestLength: 32;
static readonly blockLength: 64;
static readonly keyLength: 32;
static readonly saltLength: 8;
static readonly personalizationLength: 8;
}
export const digestLength: 32;
export const blockLength: 64;
export const keyLength: 32;
export const saltLength: 8;
export const personalizationLength: 8;
export interface BLAKE2sConfig {
key?: ByteArray;
personalization?: ByteArray;
salt?: ByteArray;
}