All Packages Class Hierarchy This Package Previous Next Index
![]() |
java.lang.Object | +----Acme.Crypto.CryptoUtils
These are static methods used by a lot of the cryptography classes. Most of them operate on byte arrays, which we call blocks. They could be encapsulated in a "Block" class, but that would mean a big efficiency hit - method calls are a lot more expensive than array accesses.
Fetch the software.
Fetch the entire Acme package.
public CryptoUtils()
public static void zeroBlock(byte block[],
int off,
int len)
public static void zeroBlock(byte block[])
public static void randomBlock(byte block[],
int off,
int len)
public static void randomBlock(byte block[])
public static void xorBlock(byte a[],
int aOff,
byte b[],
int bOff,
byte dst[],
int dstOff,
int len)
public static void xorBlock(byte a[],
byte b[],
byte dst[])
public static void copyBlock(byte src[],
int srcOff,
byte dst[],
int dstOff,
int len)
public static void copyBlock(byte src[],
byte dst[])
public static boolean equalsBlock(byte a[],
int aOff,
byte b[],
int bOff,
int len)
public static boolean equalsBlock(byte a[],
byte b[])
public static void fillBlock(byte block[],
int blockOff,
byte b,
int len)
public static void fillBlock(byte block[],
byte b)
public static void squashBytesToInts(byte inBytes[],
int inOff,
int outInts[],
int outOff,
int intLen)
public static void spreadIntsToBytes(int inInts[],
int inOff,
byte outBytes[],
int outOff,
int intLen)
public static void squashBytesToIntsLittle(byte inBytes[],
int inOff,
int outInts[],
int outOff,
int intLen)
public static void spreadIntsToBytesLittle(int inInts[],
int inOff,
byte outBytes[],
int outOff,
int intLen)
public static void squashBytesToShorts(byte inBytes[],
int inOff,
int outShorts[],
int outOff,
int shortLen)
public static void spreadShortsToBytes(int inShorts[],
int inOff,
byte outBytes[],
int outOff,
int shortLen)
public static void squashBytesToShortsLittle(byte inBytes[],
int inOff,
int outShorts[],
int outOff,
int shortLen)
public static void spreadShortsToBytesLittle(int inShorts[],
int inOff,
byte outBytes[],
int outOff,
int shortLen)
public static String toStringBlock(byte block[],
int off,
int len)
public static String toStringBlock(byte block[])
All Packages Class Hierarchy This Package Previous Next Index
ACME Java ACME Labs