1 package org.bouncycastle.operator;
2 
3 import java.io.InputStream;
4 
5 import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
6 
7 /**
8  * General interface for an operator that is able to produce
9  * an InputStream that will decrypt a stream of encrypted data.
10  */
11 public interface InputDecryptor
12 {
13     /**
14      * Return the algorithm identifier describing the encryption
15      * algorithm and parameters this decryptor can process.
16      *
17      * @return algorithm oid and parameters.
18      */
getAlgorithmIdentifier()19     AlgorithmIdentifier getAlgorithmIdentifier();
20 
21     /**
22      * Wrap the passed in input stream encIn, returning an input stream
23      * that decrypts what it reads from encIn before returning it.
24      *
25      * @param encIn InputStream containing encrypted input.
26      * @return an decrypting InputStream
27      */
getInputStream(InputStream encIn)28     InputStream getInputStream(InputStream encIn);
29 }
30