org.w3c.tools.crypt
Class DigestUtil
java.lang.Object
|
+--org.w3c.tools.crypt.DigestUtil
- public class DigestUtil
- extends java.lang.Object
This class is a container of static functions for manipulating cryptographic digests.
- See Also:
Digestable
,
Digest
Method Summary |
static int |
digestBytes2HashCode(byte[] digest)
|
static boolean |
equal(byte[] d1,
byte[] d2)
Tests the equality of digests |
static boolean |
equal(Digest d1,
Digest d2)
|
static int |
getHashCode(Digest d)
|
static java.lang.String |
toHexString(byte[] buf)
|
static java.lang.String |
toHexString(Digest d)
|
static void |
xor(byte[] d1,
byte[] d2)
XORs digests |
static void |
xor(byte[] d1,
byte[] d2,
int shift)
XORs the first digest with the second digest rotated bytewise to the
right by shift bytes |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
DigestUtil
public DigestUtil()
getHashCode
public static int getHashCode(Digest d)
digestBytes2HashCode
public static int digestBytes2HashCode(byte[] digest)
xor
public static void xor(byte[] d1,
byte[] d2)
- XORs digests
xor
public static void xor(byte[] d1,
byte[] d2,
int shift)
- XORs the first digest with the second digest rotated bytewise to the
right by
shift
bytes
equal
public static boolean equal(Digest d1,
Digest d2)
equal
public static boolean equal(byte[] d1,
byte[] d2)
- Tests the equality of digests
toHexString
public static java.lang.String toHexString(Digest d)
toHexString
public static java.lang.String toHexString(byte[] buf)