Package org.bouncycastle.crypto.fips
Class FipsOutputSigner<T extends Parameters>
- java.lang.Object
-
- org.bouncycastle.crypto.fips.FipsOutputSigner<T>
-
- Type Parameters:
T
- The parameters class for this signer.
- All Implemented Interfaces:
OutputSigner<T>
- Direct Known Subclasses:
FipsOutputSignerUsingSecureRandom
public abstract class FipsOutputSigner<T extends Parameters> extends java.lang.Object implements OutputSigner<T>
Base class for a FIPS signature generator..
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract T
getParameters()
Return the parameters for this output signer.abstract byte[]
getSignature()
Return the signature calculated on what has been written to the calculator's output stream.abstract int
getSignature(byte[] output, int off)
Output the signature value for what has been written to the signer's output stream.abstract UpdateOutputStream
getSigningStream()
Returns a stream that will accept data for the purpose of calculating a signature.
-
-
-
Method Detail
-
getParameters
public abstract T getParameters()
Description copied from interface:OutputSigner
Return the parameters for this output signer.- Specified by:
getParameters
in interfaceOutputSigner<T extends Parameters>
- Returns:
- the signer's parameters.
-
getSigningStream
public abstract UpdateOutputStream getSigningStream()
Description copied from interface:OutputSigner
Returns a stream that will accept data for the purpose of calculating a signature. Use org.bouncycastle.util.io.TeeOutputStream if you want to accumulate the data on the fly as well.- Specified by:
getSigningStream
in interfaceOutputSigner<T extends Parameters>
- Returns:
- an UpdateOutputStream
-
getSignature
public abstract byte[] getSignature() throws PlainInputProcessingException
Description copied from interface:OutputSigner
Return the signature calculated on what has been written to the calculator's output stream.- Specified by:
getSignature
in interfaceOutputSigner<T extends Parameters>
- Returns:
- a signature.
- Throws:
PlainInputProcessingException
- if the input provided cannot be processed.
-
getSignature
public abstract int getSignature(byte[] output, int off) throws PlainInputProcessingException
Description copied from interface:OutputSigner
Output the signature value for what has been written to the signer's output stream.- Specified by:
getSignature
in interfaceOutputSigner<T extends Parameters>
- Parameters:
output
- output array to write the signature to.off
- offset to start writing the signature at.- Returns:
- the number of bytes output.
- Throws:
PlainInputProcessingException
- if the input provided cannot be processed.
-
-