public interface MessageDigest
| Modifier and Type | Method and Description |
|---|---|
String |
calculate(File file)
Calculates the message digest for a input stream
|
String |
calculate(InputStream inputStream)
Calculates the message digest for a input stream
|
String |
calculate(String path)
Calculates the message digest for a input stream
|
void |
save(String source)
Saves the message digest for the source file
|
boolean |
verify(String source)
Verify the message digest for a file
|
boolean |
verify(String source,
String digest)
Verify the message digest for a file
|
String calculate(InputStream inputStream) throws IOException
inputStream - The input streamIOException - If unable to read from the input streamString calculate(File file) throws IOException
file - input file to calculate the message streamIOException - If unable to read the file (ie.: not found)String calculate(String path) throws IOException
path - The path to the file to calculate the digestIOException - If unable to read the file or if unable to read from
the input streamboolean verify(String source, String digest) throws IOException
source - The (path to the) source filedigest - The message digest to verify againstIOException - If unable to read the file or if unable to read from
the input streamboolean verify(String source) throws IOException
source - The (path to the) source fileIOException - on I/O errorsvoid save(String source) throws IOException
source - the (path to the) source fileIOException - If unable to read the file or if unable to read from
the input streamThis documentation was released into the public domain.