Package tss

Class Helpers


  • public class Helpers
    extends Object
    Author:
    pengland
    • Constructor Detail

      • Helpers

        public Helpers()
    • 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)
      • arrayToString

        public static String arrayToString​(Object arrX)
      • 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)
      • 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)