All Packages Class Hierarchy This Package Previous Next Index
Class Acme.Crypto.CryptoUtils
java.lang.Object
|
+----Acme.Crypto.CryptoUtils
- public class CryptoUtils
- extends Object
Some cryptography utilities.
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.
-
CryptoUtils()
-
-
copyBlock(byte[], byte[])
- Utility routine to copy one block to another.
-
copyBlock(byte[], int, byte[], int, int)
- Utility routine to copy one block to another.
-
equalsBlock(byte[], byte[])
- Utility routine to check two blocks for equality.
-
equalsBlock(byte[], int, byte[], int, int)
- Utility routine to check two blocks for equality.
-
fillBlock(byte[], byte)
- Utility routine fill a block with a given byte.
-
fillBlock(byte[], int, byte, int)
- Utility routine fill a block with a given byte.
-
randomBlock(byte[])
- Utility routine to fill a block with random bytes.
-
randomBlock(byte[], int, int)
- Utility routine to fill a block with random bytes.
-
spreadIntsToBytes(int[], int, byte[], int, int)
- Spread ints into bytes.
-
spreadIntsToBytesLittle(int[], int, byte[], int, int)
- Spread ints into bytes, little-endian.
-
spreadShortsToBytes(int[], int, byte[], int, int)
- Spread shorts into bytes.
-
spreadShortsToBytesLittle(int[], int, byte[], int, int)
- Spread shorts into bytes, little endian.
-
squashBytesToInts(byte[], int, int[], int, int)
- Squash bytes down to ints.
-
squashBytesToIntsLittle(byte[], int, int[], int, int)
- Squash bytes down to ints, little-endian.
-
squashBytesToShorts(byte[], int, int[], int, int)
- Squash bytes down to shorts.
-
squashBytesToShortsLittle(byte[], int, int[], int, int)
- Squash bytes down to shorts, little endian.
-
toStringBlock(byte[])
- Convert a block to a String representation.
-
toStringBlock(byte[], int, int)
- Convert a block to a String representation.
-
xorBlock(byte[], byte[], byte[])
- Utility routine to XOR two blocks.
-
xorBlock(byte[], int, byte[], int, byte[], int, int)
- Utility routine to XOR two blocks.
-
zeroBlock(byte[])
- Utility routine to fill a block with zeros.
-
zeroBlock(byte[], int, int)
- Utility routine to fill a block with zeros.
CryptoUtils
public CryptoUtils()
zeroBlock
public static void zeroBlock(byte block[],
int off,
int len)
- Utility routine to fill a block with zeros.
zeroBlock
public static void zeroBlock(byte block[])
- Utility routine to fill a block with zeros.
randomBlock
public static void randomBlock(byte block[],
int off,
int len)
- Utility routine to fill a block with random bytes.
randomBlock
public static void randomBlock(byte block[])
- Utility routine to fill a block with random bytes.
xorBlock
public static void xorBlock(byte a[],
int aOff,
byte b[],
int bOff,
byte dst[],
int dstOff,
int len)
- Utility routine to XOR two blocks.
xorBlock
public static void xorBlock(byte a[],
byte b[],
byte dst[])
- Utility routine to XOR two blocks.
copyBlock
public static void copyBlock(byte src[],
int srcOff,
byte dst[],
int dstOff,
int len)
- Utility routine to copy one block to another.
copyBlock
public static void copyBlock(byte src[],
byte dst[])
- Utility routine to copy one block to another.
equalsBlock
public static boolean equalsBlock(byte a[],
int aOff,
byte b[],
int bOff,
int len)
- Utility routine to check two blocks for equality.
equalsBlock
public static boolean equalsBlock(byte a[],
byte b[])
- Utility routine to check two blocks for equality.
fillBlock
public static void fillBlock(byte block[],
int blockOff,
byte b,
int len)
- Utility routine fill a block with a given byte.
fillBlock
public static void fillBlock(byte block[],
byte b)
- Utility routine fill a block with a given byte.
squashBytesToInts
public static void squashBytesToInts(byte inBytes[],
int inOff,
int outInts[],
int outOff,
int intLen)
- Squash bytes down to ints.
spreadIntsToBytes
public static void spreadIntsToBytes(int inInts[],
int inOff,
byte outBytes[],
int outOff,
int intLen)
- Spread ints into bytes.
squashBytesToIntsLittle
public static void squashBytesToIntsLittle(byte inBytes[],
int inOff,
int outInts[],
int outOff,
int intLen)
- Squash bytes down to ints, little-endian.
spreadIntsToBytesLittle
public static void spreadIntsToBytesLittle(int inInts[],
int inOff,
byte outBytes[],
int outOff,
int intLen)
- Spread ints into bytes, little-endian.
squashBytesToShorts
public static void squashBytesToShorts(byte inBytes[],
int inOff,
int outShorts[],
int outOff,
int shortLen)
- Squash bytes down to shorts.
spreadShortsToBytes
public static void spreadShortsToBytes(int inShorts[],
int inOff,
byte outBytes[],
int outOff,
int shortLen)
- Spread shorts into bytes.
squashBytesToShortsLittle
public static void squashBytesToShortsLittle(byte inBytes[],
int inOff,
int outShorts[],
int outOff,
int shortLen)
- Squash bytes down to shorts, little endian.
spreadShortsToBytesLittle
public static void spreadShortsToBytesLittle(int inShorts[],
int inOff,
byte outBytes[],
int outOff,
int shortLen)
- Spread shorts into bytes, little endian.
toStringBlock
public static String toStringBlock(byte block[],
int off,
int len)
- Convert a block to a String representation.
toStringBlock
public static String toStringBlock(byte block[])
- Convert a block to a String representation.
All Packages Class Hierarchy This Package Previous Next Index
ACME Java ACME Labs