public class MessageDigests extends Object
MessageDigests.| Modifier and Type | Field and Description |
|---|---|
static List<String> |
SUPPORTED_ALGORITHMS
Algorithms that every implementation of the Java platform is required to
support.
|
| Modifier | Constructor and Description |
|---|---|
protected |
MessageDigests()
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
digest(MessageDigest digest,
File input,
byte[] buffer,
long length)
Digests on given
digest with bytes read from given input file
using specified buffer. |
static byte[] |
digest(MessageDigest digest,
File input,
ByteBuffer buffer,
long length)
Digests on given
digest with bytes read from given input file
using specified buffer. |
static byte[] |
digest(MessageDigest digest,
InputStream input,
byte[] buffer,
long length)
Digests on given
digest with bytes read from given input stream
using specified buffer. |
static long |
digest(MessageDigest digest,
InputStream input,
OutputStream output,
byte[] buffer,
long length)
Digests on given digest with bytes read from given input stream and
writes the result to given output stream.
|
static byte[] |
digest(MessageDigest digest,
ReadableByteChannel input,
ByteBuffer buffer,
long length)
Digests on give
digest with bytes read from given input channel
using specified buffer. |
static long |
digest(MessageDigest digest,
ReadableByteChannel input,
WritableByteChannel output,
ByteBuffer buffer,
long length)
Digests on give digest with bytes read from given input channel
and writes the result to given output channel.
|
public static byte[] digest(MessageDigest digest, InputStream input, byte[] buffer, long length) throws IOException
digest with bytes read from given input stream
using specified buffer.digest - the digestinput - the input streambuffer - the buffer.length - the maximum number of bytes to digest; any negative value
for all available bytes.IOException - if an I/O error occurspublic static byte[] digest(MessageDigest digest, File input, byte[] buffer, long length) throws IOException
digest with bytes read from given input file
using specified buffer.digest - the digestinput - the input filebuffer - the buffer.length - the maximum number of byte to digest; any negative for all
available bytes.IOException - if an I/O error occursdigest(MessageDigest, InputStream, byte[], long)public static byte[] digest(MessageDigest digest, ReadableByteChannel input, ByteBuffer buffer, long length) throws IOException
digest with bytes read from given input channel
using specified buffer.digest - the digestinput - the input channelbuffer - the buffer.length - the maximum number of byte to digest; any negative for all
available bytes.IOException - if an I/O error occurspublic static byte[] digest(MessageDigest digest, File input, ByteBuffer buffer, long length) throws IOException
digest with bytes read from given input file
using specified buffer.digest - the digestinput - the input filebuffer - the buffer.length - the maximum number of byte to digest; any negative for all
available bytes.IOException - if an I/O error occurs; or length is not
#ALL and reached to EOF before processing specified number of
bytes.public static long digest(MessageDigest digest, InputStream input, OutputStream output, byte[] buffer, long length) throws IOException
digest - the digestinput - the input streamoutput - the output streambuffer - the buffer.length - the maximum number of bytes to digest; any negative value
for all available bytes.IOException - if an I/O error occurspublic static long digest(MessageDigest digest, ReadableByteChannel input, WritableByteChannel output, ByteBuffer buffer, long length) throws IOException
digest - the digestinput - the input channeloutput - the output channelbuffer - the buffer.length - the maximum number of byte to digest; any negative for all
available bytes.IOException - if an I/O error occursCopyright © 2011-2013. All Rights Reserved.