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} methods on the associated message
41 * digest after your calls to one of this digest output 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.
61 * The message digest associated with this stream.
63 protected MessageDigest digest;
66 * Creates a digest output stream, using the specified output stream
67 * and message digest.
71 * @param digest the message digest to associate with this stream.
73 public DigestOutputStream(OutputStream stream, MessageDigest digest) {
75 setMessageDigest(digest);
79 * Returns the message digest associated with this stream.
81 * @return the message digest associated with this stream.
85 return digest;
89 * Associates the specified message digest with this stream.
91 * @param digest the message digest to be associated with this stream.
94 public void setMessageDigest(MessageDigest digest) {
95 this.digest = digest;
99 * Updates the message digest (if the digest function is on) using
101 * to the output stream. That is, if the digest function is on
103 * {@code update} on the message digest associated with this
118 digest.update((byte)b);
123 * Updates the message digest (if the digest function is on) using
125 * the output stream. That is, if the digest function is on (see
127 * on the message digest associated with this stream, passing it
148 digest.update(b, off, len);
153 * Turns the digest function on or off. The default is on. When
155 * update on the message digest. But when it is off, the message
156 * digest is not updated.
158 * @param on true to turn the digest function on, false to turn it
166 * Prints a string representation of this digest output stream and
167 * its associated message digest object.
170 return "[Digest Output Stream] " + digest.toString();