interface KeyPair { clear(): void; getPrivateKey(): Uint8Array; getPublicKey(): string; getSeed(): Uint8Array; open(message: Uint8Array,
sender: string): Uint8Array; seal(input: Uint8Array,
recipient: string,
nonce?: Uint8Array): Uint8Array; sign(input: Uint8Array): Uint8Array; verify(input: Uint8Array,
sig: Uint8Array): boolean; } Methods
clear
- clear(): void
Returns void
getPrivateKey
- getPrivateKey(): Uint8Array
Returns Uint8Array
Uint8Array
getPublicKey
- getPublicKey(): string
Returns string
getSeed
- getSeed(): Uint8Array
Returns Uint8Array
Uint8Array
open
- open(message, sender): Uint8Array
Parameters
- message: Uint8Array
- sender: string
Returns Uint8Array
seal
- seal(input, recipient, nonce?): Uint8Array
Parameters
- input: Uint8Array
- recipient: string
Optional
nonce: Uint8Array
Returns Uint8Array
sign
- sign(input): Uint8Array
Returns Uint8Array
Uint8Array
verify
- verify(input, sig): boolean
Parameters
- input: Uint8Array
- sig: Uint8Array
Returns boolean
Clears the secret stored in the keypair. After clearing a keypair cannot be used or recovered.