O'Reilly logo

Java Security by Scott Oaks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

Class java.security.DigestInputStream

Synopsis

A digest input stream is an input filter stream that is associated with a message digest object. As data is read from the input stream, it is automatically passed to its associated message digest object; once all the data has been read, the message digest object will return the hash of the input data. You must have an existing input stream and an initialized message digest object to construct this class; once the data has passed through the stream, call the methods of the message digest object explicitly to obtain the hash.

Class Definition

public class java.security.DigestInputStream
	extends java.io.FilterInputStream {

	// Variables
	protected MessageDigest digest;

	// Constructors
	public DigestInputStream(InputStream, MessageDigest);

	// Instance Methods
	public MessageDigest getMessageDigest();
	public void on(boolean);
	public int read();
	public int read(byte[], int, int);
	public void setMessageDigest(MessageDigest);
	public String toString();
}

See also:

DigestOutputStream, MessageDigest

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required