forked from cyph/sphincs.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsphincs.d.ts
executable file
·33 lines (25 loc) · 977 Bytes
/
sphincs.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
30
31
32
33
declare module 'sphincs' {
interface ISPHINCS {
/** Signature length. */
bytes: Promise<number>;
/** Private key length. */
privateKeyBytes: Promise<number>;
/** Public key length. */
publicKeyBytes: Promise<number>;
/** Generates key pair. */
keyPair () : Promise<{privateKey: Uint8Array; publicKey: Uint8Array}>;
/** Verifies signed message against publicKey and returns it. */
open (signed: Uint8Array, publicKey: Uint8Array) : Promise<Uint8Array>;
/** Signs message with privateKey and returns combined message. */
sign (message: Uint8Array, privateKey: Uint8Array) : Promise<Uint8Array>;
/** Signs message with privateKey and returns signature. */
signDetached (message: Uint8Array, privateKey: Uint8Array) : Promise<Uint8Array>;
/** Verifies detached signature against publicKey. */
verifyDetached (
signature: Uint8Array,
message: Uint8Array,
publicKey: Uint8Array
) : Promise<boolean>;
}
const sphincs: ISPHINCS;
}