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
Modifier and TypeMethodDescriptionabstract TReturn the parameters for this output signer.abstract byte[]Return the signature calculated on what has been written to the calculator's output stream.abstract UpdateOutputStreamReturns a stream that will accept data for the purpose of calculating a signature.abstract FipsOutputSignerUsingSecureRandom<T> withSecureRandom(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
getSignatureMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.bouncycastle.crypto.OutputSigner
getSignature
-
Method Details
-
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
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
Description 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
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.
-