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

fun bytes(): Bytes

bytesArray

fun bytesArray(): ByteArray

destroy

fun destroy(): Unit

Destroys the value from memory.

equals

fun equals(other: Any?): Boolean

fromBytes

static fun fromBytes(bytes: Bytes): Allocated

Assign bytes using Sodium memory allocation

hashCode

fun hashCode(): Int

isDestroyed

fun isDestroyed(): Boolean