interface MutableBytes32 : MutableBytes, Bytes32
(source)
A mutable Bytes32, that is a mutable Bytes value of exactly 32 bytes.
static val EMPTY: MutableBytes
The empty value (with 0 bytes). |
|
static val SIZE: Int
The number of bytes in this value - i.e. 32 |
|
static val ZERO: Bytes32
A |
open static fun create(): MutableBytes32
Create a new mutable 32 bytes value. |
|
open static fun wrap(value: ByteArray): MutableBytes32
Wrap a 32 bytes array as a mutable 32 bytes value. open static fun wrap(value: ByteArray, offset: Int): MutableBytes32
Wrap a the provided array as a MutableBytes32. Note that value is not copied, only wrapped, and thus any future update to open static fun wrap(value: MutableBytes): MutableBytes32
Wrap a the provided value, which must be of size 32, as a MutableBytes32. Note that value is not copied, only wrapped, and thus any future update to open static fun wrap(value: MutableBytes, offset: Int): MutableBytes32
Wrap a slice/sub-part of the provided value as a MutableBytes32. Note that the value is not copied, and thus any future update to |
open fun and(other: Bytes32): Bytes32
Return a bit-wise AND of these bytes and the supplied bytes. |
|
open fun clear(): Unit
Set all bytes in this value to 0. |
|
open fun decrement(): MutableBytes
Decrements the value of the bytes by 1, treating the value as big endian. If decrementing underflows the value then all bits flip, i.e. decrementing 0x0000 will return 0xFFFF. |
|
open fun fill(b: Byte): Unit
Fill all the bytes of this value with the specified byte. |
|
open fun increment(): MutableBytes
Increments the value of the bytes by 1, treating the value as big endian. If incrementing overflows the value then all bits flip, i.e. incrementing 0xFFFF will return 0x0000. |
|
abstract fun mutableSlice(i: Int, length: Int): MutableBytes
Create a mutable slice of the bytes of this value. Note: the resulting slice is only a view over the original value. Holding a reference to the returned slice may hold more memory than the slide represents. Use |
|
open fun or(other: Bytes32): Bytes32
Return a bit-wise OR of these bytes and the supplied bytes. |
|
abstract fun set(i: Int, b: Byte): Unit
Set a byte in this value. |
|
open fun setInt(i: Int, value: Int): Unit
Set the 4 bytes starting at the specified index to the specified integer value. |
|
open fun setLong(i: Int, value: Long): Unit
Set the 8 bytes starting at the specified index to the specified long value. |
|
open fun xor(other: Bytes32): Bytes32
Return a bit-wise XOR of these bytes and the supplied bytes. |