Home | History | Annotate | Download | only in security

Lines Matching refs: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.
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} on the message digest associated with this
117 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
156 digest.update(b, off, len);
161 * Turns the digest function on or off. The default is on. When
163 * update on the message digest. But when it is off, the message
164 * digest is not updated.
166 * @param on true to turn the digest function on, false to turn it
174 * Prints a string representation of this digest output stream and
175 * its associated message digest object.
178 return "[Digest Output Stream] " + digest.toString();