Skip to main content

Digest

Namespace: IotaSdk

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.

public class Digest : IDigest, System.IEquatable`1[[IotaSdk.Digest, IotaSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], System.IDisposable

Inheritance ObjectDigest
Implements IDigest, IEquatable<Digest>, IDisposable
Attributes NullableContextAttribute, NullableAttribute

Constructors

Digest(UInt64)

public Digest(ulong pointer)

Parameters

pointer UInt64

Methods

Destroy()

public void Destroy()

Dispose()

public void Dispose()

NextLexicographical()

Returns the next digest in byte-increasing order.

public Digest NextLexicographical()

Returns

Digest

NextLexicographicalOpt()

Returns the next digest in byte-increasing order, or None if the result would overflow.

public Digest? NextLexicographicalOpt()

Returns

Digest?

ToBase58()

public string ToBase58()

Returns

String

ToBytes()

public Byte[] ToBytes()

Returns

Byte[]

ToString()

public override string ToString()

Returns

String

Equals(Digest)

public bool Equals(Digest? other)

Parameters

other Digest?

Returns

Boolean

Equals(Object)

public override bool Equals(object? obj)

Parameters

obj Object?

Returns

Boolean

GetHashCode()

public override int GetHashCode()

Returns

Int32

FromBase58(String)

public static Digest FromBase58(string base58)

Parameters

base58 String

Returns

Digest

Exceptions

SdkFfiException

FromBytes(Byte[])

public static Digest FromBytes(Byte[] bytes)

Parameters

bytes Byte[]

Returns

Digest

Exceptions

SdkFfiException

Random()

public static Digest Random()

Returns

Digest