1 package org.bouncycastle.operator; 2 3 import java.io.OutputStream; 4 5 import org.bouncycastle.asn1.x509.AlgorithmIdentifier; 6 7 public interface ContentSigner 8 { getAlgorithmIdentifier()9 AlgorithmIdentifier getAlgorithmIdentifier(); 10 11 /** 12 * Returns a stream that will accept data for the purpose of calculating 13 * a signature. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate 14 * the data on the fly as well. 15 * 16 * @return an OutputStream 17 */ getOutputStream()18 OutputStream getOutputStream(); 19 20 /** 21 * Returns a signature based on the current data written to the stream, since the 22 * start or the last call to getSignature(). 23 * 24 * @return bytes representing the signature. 25 */ getSignature()26 byte[] getSignature(); 27 } 28