Package tss
Class Helpers
- java.lang.Object
-
- tss.Helpers
-
public class Helpers extends Object
- Author:
- pengland
-
-
Constructor Summary
Constructors Constructor Description Helpers()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
arraysAreEqual(byte[] a, byte[] b)
static boolean
arraysAreEqual(TpmStructure[] a, TpmStructure[] b)
static String
arrayToString(Object arrX)
static byte[]
byteArrayToLenPrependedByteArray(byte[] x)
static byte[]
clone(byte[] in)
static byte[]
concatenate(byte[][] a)
static byte[]
concatenate(byte[] a, byte[] b)
static byte[]
concatenate(byte[] a, byte[] b, byte[] c)
static byte[]
fromHex(String _s)
static byte[]
hostToNet(int x)
static byte[]
hostToNet(long x)
static byte[]
hostToNet(short x)
static <T> boolean
isOneOf(T val, T... values)
static int
netToHost(byte[] x)
static byte[]
RandomBytes(int numBytes)
static byte[]
shiftRight(byte[] x, int numBits)
static String
toHex(byte[] x)
static String
toHex(byte[] x, int start, int len)
-
-
-
Method Detail
-
hostToNet
public static byte[] hostToNet(long x)
-
hostToNet
public static byte[] hostToNet(int x)
-
hostToNet
public static byte[] hostToNet(short x)
-
netToHost
public static int netToHost(byte[] x)
-
toHex
public static String toHex(byte[] x)
-
fromHex
public static byte[] fromHex(String _s)
-
toHex
public static String toHex(byte[] x, int start, int len)
-
RandomBytes
public static byte[] RandomBytes(int numBytes)
-
concatenate
public static byte[] concatenate(byte[][] a)
-
concatenate
public static byte[] concatenate(byte[] a, byte[] b)
-
concatenate
public static byte[] concatenate(byte[] a, byte[] b, byte[] c)
-
shiftRight
public static byte[] shiftRight(byte[] x, int numBits)
-
arraysAreEqual
public static boolean arraysAreEqual(byte[] a, byte[] b)
-
arraysAreEqual
public static boolean arraysAreEqual(TpmStructure[] a, TpmStructure[] b)
-
byteArrayToLenPrependedByteArray
public static byte[] byteArrayToLenPrependedByteArray(byte[] x)
-
clone
public static byte[] clone(byte[] in)
-
isOneOf
@SafeVarargs public static <T> boolean isOneOf(T val, T... values)
-
-