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

PublicKey

class PublicKey : Destroyable (source)

A signing 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

fromBytes

Create a Signature.PublicKey from an array of bytes. The byte array must be of length #length().

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

verify

Verifies the signature of a message.

fun verify(message: Bytes!, signature: Bytes!): Boolean
fun verify(message: Allocated!, signature: Allocated!): Boolean