public class UtilsKt
Modifier and Type | Method and Description |
---|---|
static byte[] |
RotateLeftOneByte(byte[] $receiver)
Rotate an array by one byte to the left
|
static byte[] |
RotateRightOneByte(byte[] $receiver)
Rotate an array by one byte to the right
|
static java.util.List<java.lang.Byte> |
XOR(java.util.List<java.lang.Byte> buffer1,
java.util.List<java.lang.Byte> buffer2)
Logical XOR of two arrays: result = buffer1 XOR buffer2. The length of the resulting array is set to the shortest of both.
|
static byte[] |
hexStringToByteArray(java.lang.String $receiver)
Convert an hexadecimal String to a ByteArray
ex:
1FABCD -> [ 0x1F, 0xAB, 0xCD ] .
See UtilsKt.toHexString to do the inverse |
static boolean |
isHex(java.lang.String $receiver)
Check is a string represent an hexadecimal value
(even length, digit and A-F chars)
|
static java.lang.String |
toHexString(byte[] $receiver)
Convert a ByteArray to a String in hexadecimal format
ex:
[ 0x1F, 0xAB, 0xCD ] -> 1FABCD .
See UtilsKt.hexStringToByteArray to do the inverse |
static java.lang.String |
toHexString(java.util.Collection<java.lang.Byte> $receiver) |
public static java.lang.String toHexString(byte[] $receiver)
Convert a ByteArray to a String in hexadecimal format
ex: [ 0x1F, 0xAB, 0xCD ] -> 1FABCD
.
See UtilsKt.hexStringToByteArray
to do the inverse
@receiver ByteArray to convert @return Hexadecimal string
UtilsKt.hexStringToByteArray
public static java.lang.String toHexString(java.util.Collection<java.lang.Byte> $receiver)
public static byte[] RotateLeftOneByte(byte[] $receiver)
Rotate an array by one byte to the left
public static byte[] RotateRightOneByte(byte[] $receiver)
Rotate an array by one byte to the right
public static java.util.List<java.lang.Byte> XOR(java.util.List<java.lang.Byte> buffer1, java.util.List<java.lang.Byte> buffer2)
Logical XOR of two arrays: result = buffer1 XOR buffer2. The length of the resulting array is set to the shortest of both.
public static byte[] hexStringToByteArray(java.lang.String $receiver)
Convert an hexadecimal String to a ByteArray
ex: 1FABCD -> [ 0x1F, 0xAB, 0xCD ]
.
See UtilsKt.toHexString
to do the inverse
@receiver String to convert @return ByteArray
UtilsKt.toHexString
public static boolean isHex(java.lang.String $receiver)
Check is a string represent an hexadecimal value (even length, digit and A-F chars)