public final class Digest
extends java.lang.Object
getFileDigest(String,MessageDigest).| Modifier and Type | Method and Description |
|---|---|
static byte[] |
getFileDigest(java.lang.String filename,
java.security.MessageDigest md)
This convenience method is used by both create() and verify().
|
static byte[] |
hexDecode(java.lang.String s)
A convenience method to convert from a string of hexadecimal digits to an array of bytes.
|
static java.lang.String |
hexEncode(byte[] bytes)
A convenience method to convert an array of bytes to a String.
|
public static byte[] getFileDigest(java.lang.String filename,
java.security.MessageDigest md)
throws java.io.IOException
filename - the file to readmd - the MessageDigestjava.io.IOException - if there is a problem reading the filepublic static java.lang.String hexEncode(byte[] bytes)
bytes - the bytes to convert to a Stringpublic static byte[] hexDecode(java.lang.String s)
throws java.lang.IllegalArgumentException
hexEncode(byte[]).s - the String to convert to an array of bytesjava.lang.IllegalArgumentException