Package org.bouncycastle.crypto.fips
Class FipsOutputSignerUsingSecureRandom<T extends Parameters>
- java.lang.Object
-
- org.bouncycastle.crypto.fips.FipsOutputSigner<T>
-
- org.bouncycastle.crypto.fips.FipsOutputSignerUsingSecureRandom<T>
-
- Type Parameters:
T
- The parameters class for this signer.
- All Implemented Interfaces:
OperatorUsingSecureRandom<OutputSignerUsingSecureRandom<T>>
,OutputSigner<T>
,OutputSignerUsingSecureRandom<T>
public abstract class FipsOutputSignerUsingSecureRandom<T extends Parameters> extends FipsOutputSigner<T> implements OutputSignerUsingSecureRandom<T>
Base class for a FIPS signature generator that makes use of a SecureRandom as part of the signing process.
-
-
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 UpdateOutputStream
getSigningStream()
Returns a stream that will accept data for the purpose of calculating a signature.abstract FipsOutputSignerUsingSecureRandom<T>
withSecureRandom(java.security.SecureRandom random)
Return a variant of this signer using the passed in random as its source of randomness.-
Methods inherited from class org.bouncycastle.crypto.fips.FipsOutputSigner
getSignature
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bouncycastle.crypto.OutputSigner
getSignature
-
-
-
-
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>
- Specified by:
getParameters
in classFipsOutputSigner<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>
- Specified by:
getSigningStream
in classFipsOutputSigner<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>
- Specified by:
getSignature
in classFipsOutputSigner<T extends Parameters>
- Returns:
- a signature.
- Throws:
PlainInputProcessingException
- if the input provided cannot be processed.
-
withSecureRandom
public abstract FipsOutputSignerUsingSecureRandom<T> withSecureRandom(java.security.SecureRandom random)
Description copied from interface:OutputSignerUsingSecureRandom
Return a variant of this signer using the passed in random as its source of randomness.- Specified by:
withSecureRandom
in interfaceOperatorUsingSecureRandom<T extends Parameters>
- Specified by:
withSecureRandom
in interfaceOutputSignerUsingSecureRandom<T extends Parameters>
- Parameters:
random
- the SecureRandom to use.- Returns:
- a signer which will use random where random data is required.
-
-