crypto / org.apache.tuweni.crypto.sodium / GenericHash / Hash

Hash

class Hash : Destroyable (source)

Generic hash function output.

Functions

bytes

fun bytes(): Bytes

Obtain the bytes of this hash. WARNING: This will cause the hash to be copied into heap memory.

bytesArray

fun bytesArray(): ByteArray

Obtain the bytes of this hash. WARNING: This will cause the hash to be copied into heap memory. The returned array should be overwritten when no longer required.

destroy

fun destroy(): Unit

equals

fun equals(other: Any?): Boolean

hashCode

fun hashCode(): Int

isDestroyed

fun isDestroyed(): Boolean

length

fun length(): Int

Provide the length of this hash.