Top Inners Fields Constructors Methods
org.bouncycastle.crypto.general

pack-priv Class DSAOutputSigner<T extends Parameters>

extends Object
implements OutputSignerUsingSecureRandom<T extends Parameters>
Class Inheritance
All Implemented Interfaces
org.bouncycastle.crypto.OutputSignerUsingSecureRandom, org.bouncycastle.crypto.OperatorUsingSecureRandom, org.bouncycastle.crypto.OutputSigner
Imports
java.io.IOException, java.math.BigInteger, java.security.SecureRandom, org.bouncycastle.asn1.ASN1EncodableVector, .ASN1Encoding, .ASN1Integer, .DEROctetString, .DERSequence, org.bouncycastle.crypto.OperatorNotReadyException, .OutputSignerUsingSecureRandom, .Parameters, .PlainInputProcessingException, .UpdateOutputStream, org.bouncycastle.crypto.internal.DSA, .Digest, org.bouncycastle.crypto.internal.io.DigestOutputStream

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static interface

Field Summary

Modifier and TypeField and Description
private final Digest
private final DSA
private final DSAOutputSigner.Initializer
private final T
private final boolean
private final boolean

Constructor Summary

AccessConstructor and Description
pack-priv
DSAOutputSigner(DSA dsa, Digest digest, T parameter, DSAOutputSigner.Initializer initializer)

pack-priv
DSAOutputSigner(DSA dsa, Digest digest, T parameter, DSAOutputSigner.Initializer initializer, boolean reverse)

pack-priv
DSAOutputSigner(boolean ready, DSA dsa, Digest digest, T parameter, DSAOutputSigner.Initializer initializer, boolean reverse)

Method Summary

Modifier and TypeMethod and Description
private byte[]
public T
getParameters()

Implements org.bouncycastle.crypto.OutputSigner.getParameters.

Return the parameters for this output signer.
public byte[]
getSignature()

Implements org.bouncycastle.crypto.OutputSigner.getSignature.

Return the signature calculated on what has been written to the calculator's output stream.
public int
getSignature(byte[]
output array to write the signature to.
output
,
int
offset to start writing the signature at.
off
)

Implements org.bouncycastle.crypto.OutputSigner.getSignature.

Output the signature value for what has been written to the signer's output stream.
public UpdateOutputStream
getSigningStream()

Implements org.bouncycastle.crypto.OutputSigner.getSigningStream.

Returns a stream that will accept data for the purpose of calculating a signature.
public DSAOutputSigner<T>
withSecureRandom(SecureRandom
the SecureRandom to use.
random
)

Implements org.bouncycastle.crypto.OutputSignerUsingSecureRandom.withSecureRandom.

Return a variant of this signer using the passed in random as its source of randomness.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

digestback to summary
private final Digest digest
dsaback to summary
private final DSA dsa
initializerback to summary
private final DSAOutputSigner.Initializer initializer
parameterback to summary
private final T parameter
readyback to summary
private final boolean ready
reverseback to summary
private final boolean reverse

Constructor Detail

DSAOutputSignerback to summary
pack-priv DSAOutputSigner(DSA dsa, Digest digest, T parameter, DSAOutputSigner.Initializer initializer)
DSAOutputSignerback to summary
pack-priv DSAOutputSigner(DSA dsa, Digest digest, T parameter, DSAOutputSigner.Initializer initializer, boolean reverse)
DSAOutputSignerback to summary
pack-priv DSAOutputSigner(boolean ready, DSA dsa, Digest digest, T parameter, DSAOutputSigner.Initializer initializer, boolean reverse)

Method Detail

encodeback to summary
private byte[] encode(BigInteger[] rs) throws IOException
getParametersback to summary
public T getParameters()

Implements org.bouncycastle.crypto.OutputSigner.getParameters.

Doc from org.bouncycastle.crypto.OutputSigner.getParameters.

Return the parameters for this output signer.

Returns:T

the signer's parameters.

getSignatureback to summary
public byte[] getSignature() throws PlainInputProcessingException

Implements org.bouncycastle.crypto.OutputSigner.getSignature.

Doc from org.bouncycastle.crypto.OutputSigner.getSignature.

Return the signature calculated on what has been written to the calculator's output stream.

Returns:byte[]

a signature.

Exceptions
PlainInputProcessingException:
if the input provided cannot be processed.
getSignatureback to summary
public int getSignature(byte[] output, int off) throws PlainInputProcessingException

Implements org.bouncycastle.crypto.OutputSigner.getSignature.

Doc from org.bouncycastle.crypto.OutputSigner.getSignature.

Output the signature value for what has been written to the signer's output stream.

Parameters
output:byte[]

output array to write the signature to.

off:int

offset to start writing the signature at.

Returns:int

the number of bytes output.

Exceptions
PlainInputProcessingException:
if the input provided cannot be processed.
getSigningStreamback to summary
public UpdateOutputStream getSigningStream()

Implements org.bouncycastle.crypto.OutputSigner.getSigningStream.

Doc from org.bouncycastle.crypto.OutputSigner.getSigningStream.

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.

Returns:UpdateOutputStream

an UpdateOutputStream

withSecureRandomback to summary
public DSAOutputSigner<T> withSecureRandom(SecureRandom random)

Implements org.bouncycastle.crypto.OutputSignerUsingSecureRandom.withSecureRandom.

Doc from org.bouncycastle.crypto.OutputSignerUsingSecureRandom.withSecureRandom.

Return a variant of this signer using the passed in random as its source of randomness.

Parameters
random:SecureRandom

the SecureRandom to use.

Returns:DSAOutputSigner<T>

a signer which will use random where random data is required.

org.bouncycastle.crypto.general back to summary

pack-priv Interface DSAOutputSigner.Initializer


Method Summary

Modifier and TypeMethod and Description
public void
initialize(DSA signer, SecureRandom random)

Method Detail

initializeback to summary
public void initialize(DSA signer, SecureRandom random)