kademlia / org.apache.tuweni.kademlia / kotlin.ByteArray

Extensions for kotlin.ByteArray

xorDist

infix fun ByteArray.xorDist(other: ByteArray): Int

Determine the XOR-distance between this and an equal-length byte array.

xorDistCmp

fun ByteArray.xorDistCmp(a: ByteArray, b: ByteArray): Int

Compare two equal-length byte arrays for their XOR-distance to this.