1package org.bouncycastle.operator;
2
3import java.io.OutputStream;
4
5import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
6
7public interface ContentVerifier
8{
9    /**
10     * Return the algorithm identifier describing the signature
11     * algorithm and parameters this expander supports.
12     *
13     * @return algorithm oid and parameters.
14     */
15    AlgorithmIdentifier getAlgorithmIdentifier();
16
17    /**
18     * Returns a stream that will accept data for the purpose of calculating
19     * a signature for later verification. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate
20     * the data on the fly as well.
21     *
22     * @return an OutputStream
23     */
24    OutputStream getOutputStream();
25
26    /**
27     * @param expected expected value of the signature on the data.
28     * @return true if the signature verifies, false otherwise
29     */
30    boolean verify(byte[] expected);
31}