Crypto

Crypto class that loads the C library

Author

Marcus Cvjeticanin

Since

0.2.0

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
external fun derivePublicKey(derivation: ByteArray, outputIndex: Long, base: ByteArray, derivedKey: ByteArray): Int

Generates a key pair from a secret key, and stores the result in the provided buffers.

Link copied to clipboard
external fun deriveSecretKey(derivation: ByteArray, outputIndex: Long, base: ByteArray, derivedKey: ByteArray)

Derives a secret key from a base key and a key derivation, and stores the result in the provided buffer.

Link copied to clipboard
external fun generateDeterministicViewKeys(publicKey: ByteArray, secretKey: ByteArray, seed: ByteArray)

Generates a deterministic key pair from a seed.

Link copied to clipboard
external fun generateKeyDerivation(publicKey: ByteArray, secretKey: ByteArray, keyDerivation: ByteArray): Int

Generates a key derivation from a public key and a secret key, and stores the result in the provided buffer.

Link copied to clipboard
external fun generateKeyImage(pub: ByteArray, sec: ByteArray, image: ByteArray)

Generates a key image from a public key and a secret key, and stores the result in the provided buffer.

Link copied to clipboard
external fun generateKeys(publicKey: ByteArray, secretKey: ByteArray)

Generates a key pair.

Link copied to clipboard
external fun underivePublicKey(derivation: ByteArray, outputIndex: Long, derivedKey: ByteArray, base: ByteArray): Int

Derives a public key from a base key and a key derivation, and stores the result in the provided buffer.