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 TgetParameters()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 UpdateOutputStreamgetSigningStream()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:OutputSignerReturn the parameters for this output signer.- Specified by:
getParametersin interfaceOutputSigner<T extends Parameters>- Specified by:
getParametersin classFipsOutputSigner<T extends Parameters>- Returns:
- the signer's parameters.
-
getSigningStream
public abstract UpdateOutputStream getSigningStream()
Description copied from interface:OutputSignerReturns 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:
getSigningStreamin interfaceOutputSigner<T extends Parameters>- Specified by:
getSigningStreamin classFipsOutputSigner<T extends Parameters>- Returns:
- an UpdateOutputStream
-
getSignature
public abstract byte[] getSignature() throws PlainInputProcessingExceptionDescription copied from interface:OutputSignerReturn the signature calculated on what has been written to the calculator's output stream.- Specified by:
getSignaturein interfaceOutputSigner<T extends Parameters>- Specified by:
getSignaturein 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:OutputSignerUsingSecureRandomReturn a variant of this signer using the passed in random as its source of randomness.- Specified by:
withSecureRandomin interfaceOperatorUsingSecureRandom<T extends Parameters>- Specified by:
withSecureRandomin interfaceOutputSignerUsingSecureRandom<T extends Parameters>- Parameters:
random- the SecureRandom to use.- Returns:
- a signer which will use random where random data is required.
-
-