tuweni / org.apache.tuweni.crypto.sodium / Box / PublicKey

PublicKey

class PublicKey : Destroyable (source)

A Box public key.

Functions

bytes

Provides the bytes of this key

fun bytes(): Bytes!

bytesArray

Provides the bytes of this key

fun bytesArray(): ByteArray!

destroy

fun destroy(): Unit

equals

fun equals(other: Any?): Boolean

forSignaturePublicKey

Transforms the Ed25519 signature public key to a Curve25519 public key. See https://libsodium.gitbook.io/doc/advanced/ed25519-curve25519

static fun forSignaturePublicKey(publicKey: PublicKey!): PublicKey!

fromBytes

Create a PublicKey from an array of bytes.

static fun fromBytes(bytes: Bytes!): PublicKey!
static fun fromBytes(bytes: ByteArray!): PublicKey!

hashCode

fun hashCode(): Int

isDestroyed

fun isDestroyed(): Boolean

length

Obtain the length of the key in bytes (32).

static fun length(): Int