1 package org.bouncycastle.crypto;
4 * interface that a message digest conforms to.
6 public interface Digest
9 * return the algorithm name
11 * @return the algorithm name
13 public String getAlgorithmName();
16 * return the size, in bytes, of the digest produced by this message digest.
18 * @return the size, in bytes, of the digest produced by this message digest.
20 public int getDigestSize();
23 * update the message digest with a single byte.
25 * @param in the input byte to be entered.
27 public void update(byte in);
30 * update the message digest with a block of bytes.
32 * @param in the byte array containing the data.
33 * @param inOff the offset into the byte array where the data starts.
34 * @param len the length of the data.
36 public void update(byte[] in, int inOff, int len);
39 * close the digest, producing the final digest value. The doFinal
40 * call leaves the digest reset.
42 * @param out the array the digest is to be copied into.
43 * @param outOff the offset into the out array the digest is to start at.
45 public int doFinal(byte[] out, int outOff);
48 * reset the digest back to it's initial state.