resolve darcs stupidity
[org.ibex.core.git] / src / org / bouncycastle / crypto / Digest.java
1 package org.bouncycastle.crypto;
2
3 /**
4  * interface that a message digest conforms to.
5  */
6 public interface Digest
7 {
8     /**
9      * return the algorithm name
10      *
11      * @return the algorithm name
12      */
13     public String getAlgorithmName();
14
15     /**
16      * return the size, in bytes, of the digest produced by this message digest.
17      *
18      * @return the size, in bytes, of the digest produced by this message digest.
19      */
20         public int getDigestSize();
21
22     /**
23      * update the message digest with a single byte.
24      *
25      * @param in the input byte to be entered.
26      */
27         public void update(byte in);
28
29     /**
30      * update the message digest with a block of bytes.
31      *
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.
35      */
36         public void update(byte[] in, int inOff, int len);
37
38     /**
39      * close the digest, producing the final digest value. The doFinal
40      * call leaves the digest reset.
41      *
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.
44      */
45         public int doFinal(byte[] out, int outOff);
46
47     /**
48      * reset the digest back to it's initial state.
49      */
50     public void reset();
51 }