Package org.bouncycastle.util
Class Pack
- java.lang.Object
-
- org.bouncycastle.util.Pack
-
public abstract class Pack extends java.lang.ObjectUtility methods for converting byte arrays into ints and longs, and back again.
-
-
Constructor Summary
Constructors Constructor Description Pack()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static intbigEndianToInt(byte[] bs, int off)static voidbigEndianToInt(byte[] bs, int off, int[] ns)static voidbigEndianToInt(byte[] bs, int off, int[] ns, int nsOff, int nsLen)static longbigEndianToLong(byte[] bs, int off)static voidbigEndianToLong(byte[] bs, int off, long[] ns)static voidbigEndianToLong(byte[] bs, int bsOff, long[] ns, int nsOff, int nsLen)static shortbigEndianToShort(byte[] bs, int off)static byte[]intToBigEndian(int n)static byte[]intToBigEndian(int[] ns)static voidintToBigEndian(int[] ns, byte[] bs, int off)static voidintToBigEndian(int[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)static voidintToBigEndian(int n, byte[] bs, int off)static byte[]intToLittleEndian(int n)static byte[]intToLittleEndian(int[] ns)static voidintToLittleEndian(int[] ns, byte[] bs, int off)static voidintToLittleEndian(int[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)static voidintToLittleEndian(int n, byte[] bs, int off)static intlittleEndianToInt(byte[] bs, int off)static int[]littleEndianToInt(byte[] bs, int off, int count)static voidlittleEndianToInt(byte[] bs, int off, int[] ns)static voidlittleEndianToInt(byte[] bs, int bOff, int[] ns, int nOff, int count)static longlittleEndianToLong(byte[] bs, int off)static voidlittleEndianToLong(byte[] bs, int off, long[] ns)static voidlittleEndianToLong(byte[] bs, int bsOff, long[] ns, int nsOff, int nsLen)static shortlittleEndianToShort(byte[] bs, int off)static byte[]longToBigEndian(long n)static byte[]longToBigEndian(long[] ns)static voidlongToBigEndian(long[] ns, byte[] bs, int off)static voidlongToBigEndian(long[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)static voidlongToBigEndian(long n, byte[] bs, int off)static voidlongToBigEndian(long value, byte[] bs, int off, int bytes)Deprecated.Will be removedstatic byte[]longToLittleEndian(long n)static byte[]longToLittleEndian(long[] ns)static voidlongToLittleEndian(long[] ns, byte[] bs, int off)static voidlongToLittleEndian(long[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)static voidlongToLittleEndian(long n, byte[] bs, int off)static byte[]shortToBigEndian(short n)static voidshortToBigEndian(short n, byte[] bs, int off)static byte[]shortToLittleEndian(short n)static voidshortToLittleEndian(short n, byte[] bs, int off)
-
-
-
Method Detail
-
bigEndianToShort
public static short bigEndianToShort(byte[] bs, int off)
-
bigEndianToInt
public static int bigEndianToInt(byte[] bs, int off)
-
bigEndianToInt
public static void bigEndianToInt(byte[] bs, int off, int[] ns)
-
bigEndianToInt
public static void bigEndianToInt(byte[] bs, int off, int[] ns, int nsOff, int nsLen)
-
intToBigEndian
public static byte[] intToBigEndian(int n)
-
intToBigEndian
public static void intToBigEndian(int n, byte[] bs, int off)
-
intToBigEndian
public static byte[] intToBigEndian(int[] ns)
-
intToBigEndian
public static void intToBigEndian(int[] ns, byte[] bs, int off)
-
intToBigEndian
public static void intToBigEndian(int[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)
-
bigEndianToLong
public static long bigEndianToLong(byte[] bs, int off)
-
bigEndianToLong
public static void bigEndianToLong(byte[] bs, int off, long[] ns)
-
bigEndianToLong
public static void bigEndianToLong(byte[] bs, int bsOff, long[] ns, int nsOff, int nsLen)
-
longToBigEndian
public static byte[] longToBigEndian(long n)
-
longToBigEndian
public static void longToBigEndian(long n, byte[] bs, int off)
-
longToBigEndian
public static byte[] longToBigEndian(long[] ns)
-
longToBigEndian
public static void longToBigEndian(long[] ns, byte[] bs, int off)
-
longToBigEndian
public static void longToBigEndian(long[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)
-
longToBigEndian
public static void longToBigEndian(long value, byte[] bs, int off, int bytes)Deprecated.Will be removed- Parameters:
value- The numberbs- The target.off- Position in target to start.bytes- number of bytes to write.
-
littleEndianToShort
public static short littleEndianToShort(byte[] bs, int off)
-
littleEndianToInt
public static int littleEndianToInt(byte[] bs, int off)
-
littleEndianToInt
public static void littleEndianToInt(byte[] bs, int off, int[] ns)
-
littleEndianToInt
public static void littleEndianToInt(byte[] bs, int bOff, int[] ns, int nOff, int count)
-
littleEndianToInt
public static int[] littleEndianToInt(byte[] bs, int off, int count)
-
shortToLittleEndian
public static byte[] shortToLittleEndian(short n)
-
shortToLittleEndian
public static void shortToLittleEndian(short n, byte[] bs, int off)
-
shortToBigEndian
public static byte[] shortToBigEndian(short n)
-
shortToBigEndian
public static void shortToBigEndian(short n, byte[] bs, int off)
-
intToLittleEndian
public static byte[] intToLittleEndian(int n)
-
intToLittleEndian
public static void intToLittleEndian(int n, byte[] bs, int off)
-
intToLittleEndian
public static byte[] intToLittleEndian(int[] ns)
-
intToLittleEndian
public static void intToLittleEndian(int[] ns, byte[] bs, int off)
-
intToLittleEndian
public static void intToLittleEndian(int[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)
-
littleEndianToLong
public static long littleEndianToLong(byte[] bs, int off)
-
littleEndianToLong
public static void littleEndianToLong(byte[] bs, int off, long[] ns)
-
littleEndianToLong
public static void littleEndianToLong(byte[] bs, int bsOff, long[] ns, int nsOff, int nsLen)
-
longToLittleEndian
public static byte[] longToLittleEndian(long n)
-
longToLittleEndian
public static void longToLittleEndian(long n, byte[] bs, int off)
-
longToLittleEndian
public static byte[] longToLittleEndian(long[] ns)
-
longToLittleEndian
public static void longToLittleEndian(long[] ns, byte[] bs, int off)
-
longToLittleEndian
public static void longToLittleEndian(long[] ns, int nsOff, int nsLen, byte[] bs, int bsOff)
-
-