Skip to main content

Digest

open class Digest : Disposable, AutoCloseable, DigestInterface

A 32-byte Blake2b256 hash output.

BCS

A Digest's BCS serialized form is defined by the following:

digest = %d32 32OCTET

Due to historical reasons, even though a Digest has a fixed-length of 32, IOTA's binary representation of a Digest is prefixed with its length meaning its serialized binary form (in bcs) is 33 bytes long vs a more compact 32 bytes.

Functions

NameSummary
close@Synchronized
open override fun close()
destroyopen override fun destroy()
equalsopen operator override fun equals(other: Any?): Boolean
hashCodeopen override fun hashCode(): Int
nextLexicographicalopen override fun nextLexicographical(): Digest
Returns the next digest in byte-increasing order.
nextLexicographicalOptopen override fun nextLexicographicalOpt(): Digest?
Returns the next digest in byte-increasing order, or None if the result would overflow.
toBase58open override fun toBase58(): String
toBytesopen override fun toBytes(): ByteArray
toStringopen override fun toString(): String

Companion object functions

NameSummary
fromBase58fun fromBase58(base58: String): Digest
fromBytesfun fromBytes(bytes: ByteArray): Digest
randomfun random(): Digest