|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jopendocument.util.MessageDigestUtils
public class MessageDigestUtils
Method Summary | |
---|---|
static String |
asHex(byte[] hash)
Turns array of bytes into string representing each byte as unsigned hex number. |
static int |
bytes2int(byte[] buf)
Cat 4 bytes to make an int. |
static byte[] |
fromHex(String hash)
|
static String |
getHashString(MessageDigest md)
|
static String |
getHashString(MessageDigest md,
byte[] data)
|
static String |
getHashString(MessageDigest md,
InputStream ins)
|
static String |
getHashString(String algo,
byte[] data)
|
static MessageDigest |
getMD5()
|
static String |
getMD5(File f)
|
static byte[] |
int2bytes(int integer)
Split an int into 4 bytes. |
static String |
toString(byte[] hash,
char[] chars)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String asHex(byte[] hash)
hash
- Array of bytes to convert to hex-string
public static String toString(byte[] hash, char[] chars)
public static byte[] fromHex(String hash)
public static byte[] int2bytes(int integer)
integer
- an int, eg -2^31, or 16.
public static int bytes2int(byte[] buf)
buf
- an array of at least 4 bytes, eg [0x80, 0x00, 0x00, 0x03].
public static String getHashString(MessageDigest md)
public static String getHashString(String algo, byte[] data) throws NoSuchAlgorithmException
NoSuchAlgorithmException
public static String getHashString(MessageDigest md, byte[] data)
public static String getHashString(MessageDigest md, InputStream ins) throws IOException
IOException
public static String getMD5(File f) throws IOException
IOException
public static MessageDigest getMD5()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |