tuweni / org.apache.tuweni.crypto.sodium / Allocated

Allocated

class Allocated : Destroyable (source)

Allocated objects track allocation of memory using Sodium.

See Also
<a href="https://libsodium.gitbook.io/doc/memory_management">Secure memory</a>

Functions

bytes

Provides the bytes of this key.

fun bytes(): Bytes!

bytesArray

Provides the bytes of this key.

fun bytesArray(): ByteArray!

destroy

Destroys the value from memory.

fun destroy(): Unit

equals

fun equals(other: Any?): Boolean

finalize

fun finalize(): Unit

fromBytes

Assign bytes using Sodium memory allocation

static fun fromBytes(bytes: Bytes!): Allocated!

hashCode

fun hashCode(): Int

isDestroyed

Returns true if the value is destroyed.

fun isDestroyed(): Boolean