public class ByteUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
EMPTY_BYTES |
| Constructor and Description |
|---|
ByteUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
bitLength(byte[] bytes) |
static int |
bitLength(int byteLength) |
static int |
byteLength(int numberOfBits) |
static byte[] |
concat(byte[]... byteArrays) |
static int[] |
convertSignedTwosCompToUnsigned(byte[] bytes) |
static byte[] |
convertUnsignedToSignedTwosComp(int[] ints) |
static byte |
getByte(int intValue) |
static byte[] |
getBytes(int intValue) |
static byte[] |
getBytes(long longValue) |
static int |
getInt(byte b) |
static byte[] |
leftHalf(byte[] inputBytes) |
static byte[] |
randomBytes(int length) |
static byte[] |
randomBytes(int length,
SecureRandom secureRandom) |
static byte[] |
rightHalf(byte[] inputBytes) |
static boolean |
secureEquals(byte[] bytes1,
byte[] bytes2) |
static byte[] |
subArray(byte[] inputBytes,
int startPos,
int length) |
static String |
toDebugString(byte[] bytes) |
public static byte[] convertUnsignedToSignedTwosComp(int[] ints)
public static int[] convertSignedTwosCompToUnsigned(byte[] bytes)
public static byte getByte(int intValue)
public static byte[] getBytes(int intValue)
public static byte[] getBytes(long longValue)
public static int getInt(byte b)
public static boolean secureEquals(byte[] bytes1,
byte[] bytes2)
public static byte[] concat(byte[]... byteArrays)
public static byte[] subArray(byte[] inputBytes,
int startPos,
int length)
public static byte[] leftHalf(byte[] inputBytes)
public static byte[] rightHalf(byte[] inputBytes)
public static int bitLength(byte[] bytes)
public static int bitLength(int byteLength)
public static int byteLength(int numberOfBits)
public static byte[] randomBytes(int length,
SecureRandom secureRandom)
public static byte[] randomBytes(int length)
public static String toDebugString(byte[] bytes)
Copyright © 2020. All rights reserved.