Top Fields Constructors Methods
org.bouncycastle.jcajce.provider.asymmetric.util

public abstract Class DSABase

extends SignatureSpi
implements PKCSObjectIdentifiers, X509ObjectIdentifiers
Class Inheritance
All Implemented Interfaces
org.bouncycastle.asn1.x509.X509ObjectIdentifiers, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers
Known Direct Subclasses
org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi
Imports
java.math.BigInteger, java.security.SignatureException, .SignatureSpi, java.security.spec.AlgorithmParameterSpec, org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers, org.bouncycastle.asn1.x509.X509ObjectIdentifiers, org.bouncycastle.crypto.DSAExt, .Digest, org.bouncycastle.crypto.signers.DSAEncoding

Field Summary

Modifier and TypeField and Description
protected Digest
protected DSAEncoding
protected DSAExt
Inherited from java.security.SignatureSpi:
appRandom

Constructor Summary

AccessConstructor and Description
protected
DSABase(Digest digest, DSAExt signer, DSAEncoding encoding)

Method Summary

Modifier and TypeMethod and Description
protected Object
engineGetParameter(String
the string name of the parameter.
param
)

Implements abstract java.security.SignatureSpi.engineGetParameter.

Deprecated

Gets the value of the specified algorithm parameter.

protected void
engineSetParameter(AlgorithmParameterSpec
the parameters
params
)

Overrides java.security.SignatureSpi.engineSetParameter.

Initializes this Signature object with the specified parameter values.

protected void
engineSetParameter(String
the string identifier of the parameter.
param
,
Object
the parameter value.
value
)

Implements abstract java.security.SignatureSpi.engineSetParameter.

Deprecated replaced with "#engineSetParameter(java.security.spec.AlgorithmParameterSpec)"

Sets the specified algorithm parameter to the specified value.

protected byte[]
engineSign()

Implements abstract java.security.SignatureSpi.engineSign.

Returns the signature bytes of all the data updated so far.

protected void
engineUpdate(byte
the byte to use for the update.
b
)

Implements abstract java.security.SignatureSpi.engineUpdate.

Updates the data to be signed or verified using the specified byte.

protected void
engineUpdate(byte[]
the array of bytes
b
,
int
the offset to start from in the array of bytes
off
,
int
the number of bytes to use, starting at offset
len
)

Implements abstract java.security.SignatureSpi.engineUpdate.

Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.

protected boolean
engineVerify(byte[]
the signature bytes to be verified.
sigBytes
)

Implements abstract java.security.SignatureSpi.engineVerify.

Verifies the passed-in signature.

Inherited from java.security.SignatureSpi:
cloneengineGetParametersengineInitSignengineInitSignengineInitVerifyengineSignengineUpdateengineVerify

Field Detail

digestback to summary
protected Digest digest
encodingback to summary
protected DSAEncoding encoding
signerback to summary
protected DSAExt signer

Constructor Detail

DSABaseback to summary
protected DSABase(Digest digest, DSAExt signer, DSAEncoding encoding)

Method Detail

engineGetParameterback to summary
protected Object engineGetParameter(String param)

Implements abstract java.security.SignatureSpi.engineGetParameter.

Doc from java.security.SignatureSpi.engineGetParameter.

Deprecated

Gets the value of the specified algorithm parameter. This method supplies a general-purpose mechanism through which it is possible to get the various parameters of this object. A parameter may be any settable parameter for the algorithm, such as a parameter size, or a source of random bits for signature generation (if appropriate), or an indication of whether to perform a specific but optional computation. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.

Parameters
param:String

the string name of the parameter.

Returns:Object

the object that represents the parameter value, or null if there is none.

engineSetParameterback to summary
protected void engineSetParameter(AlgorithmParameterSpec params)

Overrides java.security.SignatureSpi.engineSetParameter.

Doc from java.security.SignatureSpi.engineSetParameter.

Initializes this Signature object with the specified parameter values.

Parameters
params:AlgorithmParameterSpec

the parameters

engineSetParameterback to summary
protected void engineSetParameter(String param, Object value)

Implements abstract java.security.SignatureSpi.engineSetParameter.

Doc from java.security.SignatureSpi.engineSetParameter.

Deprecated

replaced with "#engineSetParameter(java.security.spec.AlgorithmParameterSpec)"

Sets the specified algorithm parameter to the specified value. This method supplies a general-purpose mechanism through which it is possible to set the various parameters of this object. A parameter may be any settable parameter for the algorithm, such as a parameter size, or a source of random bits for signature generation (if appropriate), or an indication of whether to perform a specific but optional computation. A uniform algorithm-specific naming scheme for each parameter is desirable but left unspecified at this time.

Parameters
param:String

the string identifier of the parameter.

value:Object

the parameter value.

engineSignback to summary
protected byte[] engineSign() throws SignatureException

Implements abstract java.security.SignatureSpi.engineSign.

Doc from java.security.SignatureSpi.engineSign.

Returns the signature bytes of all the data updated so far. The format of the signature depends on the underlying signature scheme.

Returns:byte[]

the signature bytes of the signing operation's result.

Exceptions
SignatureException:
if the engine is not initialized properly or if this signature algorithm is unable to process the input data provided.
engineUpdateback to summary
protected void engineUpdate(byte b) throws SignatureException

Implements abstract java.security.SignatureSpi.engineUpdate.

Doc from java.security.SignatureSpi.engineUpdate.

Updates the data to be signed or verified using the specified byte.

Parameters
b:byte

the byte to use for the update.

Exceptions
SignatureException:
if the engine is not initialized properly.
engineUpdateback to summary
protected void engineUpdate(byte[] b, int off, int len) throws SignatureException

Implements abstract java.security.SignatureSpi.engineUpdate.

Doc from java.security.SignatureSpi.engineUpdate.

Updates the data to be signed or verified, using the specified array of bytes, starting at the specified offset.

Parameters
b:byte[]

the array of bytes

off:int

the offset to start from in the array of bytes

len:int

the number of bytes to use, starting at offset

Exceptions
SignatureException:
if the engine is not initialized properly
engineVerifyback to summary
protected boolean engineVerify(byte[] sigBytes) throws SignatureException

Implements abstract java.security.SignatureSpi.engineVerify.

Doc from java.security.SignatureSpi.engineVerify.

Verifies the passed-in signature.

Parameters
sigBytes:byte[]

the signature bytes to be verified.

Returns:boolean

true if the signature was verified, false if not.

Exceptions
SignatureException:
if the engine is not initialized properly, the passed-in signature is improperly encoded or of the wrong type, if this signature algorithm is unable to process the input data provided, etc.