DsaWithNoneSignature
insteadpublic final class RawDsaCapi extends DsaCapi
This class expects its input to be already hashed with SHA-1. It is not expected that the Raw DSA algorithm will be heavily used by application developers; it is mainly for internal purposes.
This class supports private keys of type CapiDsaPrivateKey.
Use the "Raw" DSA signature like any other signature algorithm, but supply the hashed data to the update() methods instead of the original data to be signed. You can call all of the update methods in any combination, but when you call sign() or verify() exactly 20 bytes must have been passed during the updates. This is necessary because DSA was specifically designed for the 160 bit hashes of SHA-1.
Signature.getInstance("RawDSA") to create a
raw DSA Signature object. Applications should then invoke
Signature.initSign(capiPrivateKey), which initializes the
Signature object with a CapiDsaPrivateKey.
Signature,
CapiDsaPrivateKeyEntrustDSA.Raw| Constructor and Description |
|---|
RawDsaCapi()
Deprecated.
Create an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
engineInitSign(java.security.PrivateKey privateKey)
Deprecated.
Initializes this signature object with the specified private key
for signing operations.
|
protected byte[] |
engineSign()
Deprecated.
Returns the signature bytes of all the data updated so far.
|
protected void |
engineUpdate(byte b)
Deprecated.
Updates the data to be signed or verified using the specified byte.
|
protected void |
engineUpdate(byte[] b,
int offset,
int length)
Deprecated.
Updates the data to be signed or verified, using the specified
array of bytes, starting at the specified offset.
|
engineInitVerify, engineVerify, getDigestengineGetParameter, engineSetParameter, engineSetParameter, RStoASN1, RStoASN1clone, getAlgorithm, getInstance, getInstance, getInstance, getParameter, getParameters, getProvider, initSign, initSign, initVerify, initVerify, setParameter, setParameter, sign, sign, toString, update, update, update, update, verify, verifypublic RawDsaCapi()
protected void engineInitSign(java.security.PrivateKey privateKey)
throws java.security.InvalidKeyException
NullPointerException will be thrown.engineInitSign in class DsaCapiprivateKey - the CapiDsaPrivateKey to be used to generate the signature.java.security.InvalidKeyException - if the given key does not reside in CAPI, or if no MessageDigest instance
can be obtained for the key.protected byte[] engineSign()
throws java.security.SignatureException
engineSign in class DsaCapijava.security.SignatureException - if any error occurs creating the signatureprotected void engineUpdate(byte b)
throws java.security.SignatureException
engineUpdate in class DsaCapib - The byte to use for the updatejava.security.SignatureException - if too many bytes are added to the message digest value.protected void engineUpdate(byte[] b,
int offset,
int length)
throws java.lang.ArrayIndexOutOfBoundsException,
java.security.SignatureException
engineUpdate in class DsaCapib - the array of bytesoffset - the offset to start from in the array of byteslength - the number of bytes to use, starting at offsetjava.lang.ArrayIndexOutOfBoundsException - if the given offset and length refer to data
outside the bounds of the given array.java.security.SignatureException - if the given data will exceed the number of bytes that can
be signed.