tuweni / org.apache.tuweni.bytes / Bytes48

Bytes48

interface Bytes48 : Bytes (source)

A Bytes value that is guaranteed to contain exactly 48 bytes.

Properties

SIZE

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

static val SIZE: Int

ZERO

A Bytes48 containing all zero bytes

static val ZERO: Bytes48!

Functions

and

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

open fun and(other: Bytes48!): Bytes48!

copy

abstract fun copy(): Bytes48!

fromHexString

Parse a hexadecimal string into a Bytes48.

open static fun fromHexString(str: CharSequence!): Bytes48!

fromHexStringLenient

Parse a hexadecimal string into a Bytes48.

open static fun fromHexStringLenient(str: CharSequence!): Bytes48!

fromHexStringStrict

Parse a hexadecimal string into a Bytes48.

open static fun fromHexStringStrict(str: CharSequence!): Bytes48!

leftPad

Left pad a Bytes value with zero bytes to create a Bytes48.

open static fun leftPad(value: Bytes!): Bytes48!

mutableCopy

abstract fun mutableCopy(): MutableBytes48!

not

open fun not(): Bytes48!

or

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

open fun or(other: Bytes48!): Bytes48!

random

Generate random bytes.

open static fun random(): Bytes48!
open static fun random(generator: Random!): Bytes48!

rightPad

Right pad a Bytes value with zero bytes to create a Bytes48.

open static fun rightPad(value: Bytes!): Bytes48!

shiftLeft

open fun shiftLeft(distance: Int): Bytes48!

shiftRight

open fun shiftRight(distance: Int): Bytes48!

size

open fun size(): Int

wrap

Wrap the provided byte array, which must be of length 48, as a Bytes48.

open static fun wrap(bytes: ByteArray!): Bytes48!

Wrap a slice/sub-part of the provided array as a Bytes48.

open static fun wrap(bytes: ByteArray!, offset: Int): Bytes48!

Wrap a the provided value, which must be of size 48, as a Bytes48.

open static fun wrap(value: Bytes!): Bytes48!

Wrap a slice/sub-part of the provided value as a Bytes48.

open static fun wrap(value: Bytes!, offset: Int): Bytes48!

xor

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

open fun xor(other: Bytes48!): Bytes48!

Inheritors

DelegatingBytes48

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

open class DelegatingBytes48 : DelegatingBytes, Bytes48

MutableBytes48

A mutable Bytes48, that is a mutable Bytes value of exactly 48 bytes.

interface MutableBytes48 : MutableBytes, Bytes48