public class CapiUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static void |
encodeBigInteger(byte[] output,
int offset,
int size,
java.math.BigInteger value)
Encodes a Java
BigInteger value to MSCAPI big integer
representation. |
static void |
encodeBigInteger(byte[] output,
int offset,
int size,
java.math.BigInteger value,
boolean littleEndian)
Encodes a Java
BigInteger value to either little endian or
big endian MSCAPI big integer representation. |
static byte[] |
reverseArray(byte[] ba)
Reverses the order of the bytes in a byte array.
|
public static byte[] reverseArray(byte[] ba)
ba - a byte arraypublic static void encodeBigInteger(byte[] output,
int offset,
int size,
java.math.BigInteger value)
BigInteger value to MSCAPI big integer
representation.
In MSCAPI, big integer values are usually represented as a fixed length set of bytes with little endian byte order, however, sometimes big endian byte order is used.
output - the output buffer for the resultoffset - the offset in output where the result is storedsize - the size of the result;
output will be padded with leading zeros as necessaryvalue - the big integer value in Java BigInteger
representationpublic static void encodeBigInteger(byte[] output,
int offset,
int size,
java.math.BigInteger value,
boolean littleEndian)
BigInteger value to either little endian or
big endian MSCAPI big integer representation.
In MSCAPI, big integer values are usually represented as a fixed length set of bytes with little endian byte order, however, sometimes big endian byte order is used.
output - the output buffer for the resultoffset - the offset in output where the result is storedsize - the size of the result;
output will be padded with leading zeros as necessaryvalue - the big integer value in Java BigInteger
representation