Lines Matching defs:digest

36  * A transparent stream that updates the associated message digest using
39 * <p>To complete the message digest computation, call one of the
40 * <code>digest</code> methods on the associated message
41 * digest after your calls to one of this digest ouput stream's
47 * an update on the message digest. But when it is off, the message
48 * digest is not updated. The default is for the stream to be on.
60 * The message digest associated with this stream.
62 protected MessageDigest digest;
65 * Creates a digest output stream, using the specified output stream
66 * and message digest.
70 * @param digest the message digest to associate with this stream.
72 public DigestOutputStream(OutputStream stream, MessageDigest digest) {
74 setMessageDigest(digest);
78 * Returns the message digest associated with this stream.
80 * @return the message digest associated with this stream.
84 return digest;
88 * Associates the specified message digest with this stream.
90 * @param digest the message digest to be associated with this stream.
93 public void setMessageDigest(MessageDigest digest) {
94 this.digest = digest;
98 * Updates the message digest (if the digest function is on) using
100 * to the output stream. That is, if the digest function is on
102 * <code>update</code> on the message digest associated with this
116 digest.update((byte)b);
122 * Updates the message digest (if the digest function is on) using
124 * the output stream. That is, if the digest function is on (see
126 * on the message digest associated with this stream, passing it
146 digest.update(b, off, len);
152 * Turns the digest function on or off. The default is on. When
154 * update on the message digest. But when it is off, the message
155 * digest is not updated.
157 * @param on true to turn the digest function on, false to turn it
165 * Prints a string representation of this digest output stream and
166 * its associated message digest object.
169 return "[Digest Output Stream] " + digest.toString();