org.w3c.rdf.digest
Class DigestUtil
java.lang.Object
|
+--org.w3c.rdf.digest.DigestUtil
- public class DigestUtil
- extends java.lang.Object
This class is a container of static functions for manipulating cryptographic digests.
- See Also:
Digestable
,
Digest
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DigestUtil
public DigestUtil()
computeDigest
public static Digest computeDigest(java.lang.String alg,
java.lang.String str)
throws java.security.NoSuchAlgorithmException
computeDigest
public static Digest computeDigest(java.lang.String alg,
byte[] b)
throws java.security.NoSuchAlgorithmException
createFromBytes
public static Digest createFromBytes(java.lang.String alg,
byte[] digest)
throws DigestException
getHashCode
public static int getHashCode(Digest d)
throws DigestException
digestBytes2HashCode
public static int digestBytes2HashCode(byte[] digest)
xor
public static void xor(byte[] d1,
byte[] d2)
xor
public static void xor(byte[] d1,
byte[] d2,
int shift)
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)
throws DigestException
toHexString
public static java.lang.String toHexString(byte[] buf)