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

PublicKey

class PublicKey (source)

A signing public key.

Functions

bytes

fun bytes(): Bytes

bytesArray

fun bytesArray(): ByteArray

equals

fun equals(other: Any?): Boolean

fromBytes

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

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

hashCode

fun hashCode(): Int

length

static fun length(): Int

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

verify

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

Verifies the signature of a message.