ApolloImpl

Apollo defines the set of cryptographic operations that are used in the Atala PRISM.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun createPrivateKey(properties: Map<String, Any>): PrivateKey

Creates a private key based on the provided properties.

Link copied to clipboard
open override fun createPublicKey(properties: Map<String, Any>): PublicKey

Creates a private key based on the provided properties.

Link copied to clipboard
open override fun createRandomMnemonics(): Array<String>

Creates a random set of mnemonic phrases that can be used as a seed for generating a private key.

Link copied to clipboard
open override fun createRandomSeed(passphrase: String?): SeedWords

Creates a random seed and a corresponding set of mnemonic phrases.

Link copied to clipboard
open override fun createSeed(mnemonics: Array<String>, passphrase: String): Seed

Takes in a set of mnemonics and a passphrase, and returns a seed object used to generate a private key.

Link copied to clipboard
open override fun isPrivateKeyData(identifier: String, data: ByteArray): Boolean

Checks if the provided data is associated with a private key identified by the given identifier.

Link copied to clipboard
open override fun isPublicKeyData(identifier: String, data: ByteArray): Boolean

Checks if the provided data is associated with a public key identified by the given identifier.

Link copied to clipboard
open override fun restoreKey(key: JWK, index: Int?): Key

Restores a key from a JWK (JSON Web Key).

Link copied to clipboard
open override fun restorePrivateKey(key: StorableKey): PrivateKey

Restores a private key based on the provided storable key.

open override fun restorePrivateKey(storablePrivateKey: StorablePrivateKey): PrivateKey
open override fun restorePrivateKey(restorationIdentifier: String, privateKeyData: String): PrivateKey

Restores a private key from StorablePrivateKey.

Link copied to clipboard
open override fun restorePublicKey(key: StorableKey): PublicKey

Restores a public key based on the provided storable key.