Lines Matching defs:digest
26 * associated message digest.
31 * The message digest for this stream.
33 protected MessageDigest digest;
35 // Indicates whether digest functionality is on or off
40 * given {@code stream} and the {@code digest}.
47 * @param digest
48 * the message digest.
50 public DigestInputStream(InputStream stream, MessageDigest digest) {
52 this.digest = digest;
56 * Returns the message digest for this stream.
58 * @return the message digest for this stream.
61 return digest;
65 * Sets the message digest which this stream will use.
67 * @param digest
68 * the message digest which this stream will use.
70 public void setMessageDigest(MessageDigest digest) {
71 this.digest = digest;
75 * Reads the next byte and returns it as an {@code int}. Updates the digest
88 // update digest only if
89 // - digest functionality is on
92 digest.update((byte)byteRead);
100 * the specified offset. Updates the digest if this function is
121 // update digest only if
122 // - digest functionality is on
125 digest.update(b, off, bytesRead);
132 * Enables or disables the digest function (default is on).
135 * {@code true} if the digest should be computed, {@code false}
145 * {@code DigestInputStream} including the digest.
151 return super.toString() + ", " + digest.toString() +