Utils

object Utils

Functions

Link copied to clipboard

Converts a byte array to a hex string.

Link copied to clipboard
fun ByteArray.encodeHex(prefixOx: Boolean = false): String

Converts a byte array to a hex string.

Link copied to clipboard

Function converts an integer to Big Endian representation.

Link copied to clipboard

Function converts a byte array encoded in uint16 to utf8. Each byte is encoded in utf8 as follows:

Link copied to clipboard

Function converts a byte array encoded in utf8 to uint16. Each byte is encoded in utf8 as follows:

Link copied to clipboard
infix fun ByteArray.xor(other: ByteArray): ByteArray

Applies the XOR operator on two byte arrays. Compared to already existent xor functions, this one does not require the arrays to be of the same length.