ByteUtils class

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

areEqual(ByteArray a, ByteArray b) → bool
Compare two byte arrays for equality
bytesToHex(ByteArray bytes, [int offset = 0, int? length]) → HexString
Convert a byte array to its hexadecimal string representation
bytesToLittleEndian(ByteArray bytes) → ByteArray
Converts byte array to little-endian
clear(ByteArray data) → void
Clear a byte array by filling it with zeros
compareBytes(ByteArray a, ByteArray b) → bool
Compares two byte arrays
copyOf(ByteArray original, int length) → ByteArray
Create a copy of a byte array
fit(dynamic bytes, int length) → ByteArray
Fits byte array or string to specified length
hexToBytes(HexString hex) → ByteArray
Convert a hexadecimal string to a byte array
numberToLittleEndian(int value, int length) → ByteArray
Converts number to little-endian bytes
readLittleEndianUnsigned(ByteBuffer buffer, [int bytes = 8]) → BigInt
Reads little-endian unsigned values from a buffer
toBytes(dynamic value, int length) → ByteArray
Convert a number to a byte array of specified length
toHexString(int value) → String
toLittleEndian(ByteArray value, [int offset = 0, int? length]) → ByteArray
Convert a byte array to little-endian format
trimAddress(String addressHex) → String
Trims address for display

Constants

hexChars → const String
Hexadecimal characters for byte-to-hex conversion