class KeyPair
(source)
A Box key pair.
KeyPair(publicKey: PublicKey, secretKey: SecretKey)
Create a KeyPair from pair of keys. |
fun equals(other: Any?): Boolean |
|
static fun forSecretKey(secretKey: SecretKey): KeyPair
Create a KeyPair from an array of secret key bytes. |
|
static fun forSignatureKeyPair(keyPair: KeyPair): KeyPair
Converts signature key pair (Ed25519) to a box key pair (Curve25519) so that the same key pair can be used both for authenticated encryption and for signatures. See https://libsodium.gitbook.io/doc/advanced/ed25519-curve25519 |
|
static fun fromSeed(seed: Seed): KeyPair
Generate a new key using a seed. |
|
fun hashCode(): Int |
|
fun publicKey(): PublicKey |
|
static fun random(): KeyPair
Generate a new key using a random generator. |
|
fun secretKey(): SecretKey |