bytes / org.apache.tuweni.bytes / DelegatingBytes32

DelegatingBytes32

open class DelegatingBytes32 : AbstractBytes, Bytes32 (source)

A class that holds and delegates all operations to its inner bytes field.

This class may be used to create more types that represent 32 bytes, but need a different name for business logic.

Inherited Properties

SIZE

static val SIZE: Int

The number of bytes in this value - i.e. 32

ZERO

static val ZERO: Bytes32

A Bytes32 containing all zero bytes

Functions

copy

open fun copy(): Bytes32

get

open fun get(i: Int): Byte

mutableCopy

open fun mutableCopy(): MutableBytes32

size

open fun size(): Int

slice

open fun slice(index: Int, length: Int): Bytes

Inherited Functions

and

open fun and(other: Bytes32): Bytes32

Return a bit-wise AND of these bytes and the supplied bytes.

equals

open fun equals(other: Any?): Boolean

Compare this value and the provided one for equality.

Two Bytes values are equal is they have contain the exact same bytes.

hashCode

open fun hashCode(): Int

or

open fun or(other: Bytes32): Bytes32

Return a bit-wise OR of these bytes and the supplied bytes.

toString

open fun toString(): String

xor

open fun xor(other: Bytes32): Bytes32

Return a bit-wise XOR of these bytes and the supplied bytes.