Top Description Fields Constructors Methods
org.bouncycastle.operator

public Class BufferingContentSigner

extends Object
implements ExtendedContentSigner
Class Inheritance
All Implemented Interfaces
org.bouncycastle.operator.ExtendedContentSigner, org.bouncycastle.operator.ContentSigner
Imports
java.io.OutputStream, org.bouncycastle.asn1.x509.AlgorithmIdentifier, org.bouncycastle.util.io.BufferingOutputStream

A class that explicitly buffers the data to be signed, sending it in one block when ready for signing.

Field Summary

Modifier and TypeField and Description
private final ContentSigner
private final OutputStream

Constructor Summary

AccessConstructor and Description
public
BufferingContentSigner(ContentSigner
the content signer to be wrapped.
contentSigner
)

Base constructor.

public
BufferingContentSigner(ContentSigner
the content signer to be wrapped.
contentSigner
,
int
the size of the internal buffer to use.
bufferSize
)

Base constructor.

Method Summary

Modifier and TypeMethod and Description
public AlgorithmIdentifier

Returns:

algorithm identifier for the signature generated.
getAlgorithmIdentifier
()

Implements org.bouncycastle.operator.ContentSigner.getAlgorithmIdentifier.

Return the algorithm identifier supported by this signer.

public AlgorithmIdentifier

Returns:

algorithm oid and parameters, null otherwise.
getDigestAlgorithmIdentifier
()

Implements org.bouncycastle.operator.ExtendedContentSigner.getDigestAlgorithmIdentifier.

Return the algorithm identifier describing the digest algorithm used by this signature algorithm, if known.

public OutputStream

Returns:

the output stream used to accumulate the data.
getOutputStream
()

Implements org.bouncycastle.operator.ContentSigner.getOutputStream.

Return the buffering stream.

public byte[]

Returns:

the signature calculated from the bytes written to the buffering stream.
getSignature
()

Implements org.bouncycastle.operator.ContentSigner.getSignature.

Generate signature from internally buffered data.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

contentSignerback to summary
private final ContentSigner contentSigner
outputback to summary
private final OutputStream output

Constructor Detail

BufferingContentSignerback to summary
public BufferingContentSigner(ContentSigner contentSigner)

Base constructor.

Parameters
contentSigner:ContentSigner

the content signer to be wrapped.

BufferingContentSignerback to summary
public BufferingContentSigner(ContentSigner contentSigner, int bufferSize)

Base constructor.

Parameters
contentSigner:ContentSigner

the content signer to be wrapped.

bufferSize:int

the size of the internal buffer to use.

Method Detail

getAlgorithmIdentifierback to summary
public AlgorithmIdentifier getAlgorithmIdentifier()

Implements org.bouncycastle.operator.ContentSigner.getAlgorithmIdentifier.

Return the algorithm identifier supported by this signer.

Returns:AlgorithmIdentifier

algorithm identifier for the signature generated.

getDigestAlgorithmIdentifierback to summary
public AlgorithmIdentifier getDigestAlgorithmIdentifier()

Implements org.bouncycastle.operator.ExtendedContentSigner.getDigestAlgorithmIdentifier.

Return the algorithm identifier describing the digest algorithm used by this signature algorithm, if known.

Returns:AlgorithmIdentifier

algorithm oid and parameters, null otherwise.

getOutputStreamback to summary
public OutputStream getOutputStream()

Implements org.bouncycastle.operator.ContentSigner.getOutputStream.

Return the buffering stream.

Returns:OutputStream

the output stream used to accumulate the data.

getSignatureback to summary
public byte[] getSignature()

Implements org.bouncycastle.operator.ContentSigner.getSignature.

Generate signature from internally buffered data.

Returns:byte[]

the signature calculated from the bytes written to the buffering stream.