DsaWithSha1Signature
insteadpublic class DsaCapi extends EntrustDSA
Applications should not instantiate this class directly. They should use
Signature.getInstance("DSA", "Entrust") to create a
DSA Signature object, then use Signature.initSign(capiPrivateKey)
to initialize that Signature object with a CapiDsaPrivateKey.
EntrustDSAEntrustDSA.Raw| Constructor and Description |
|---|
DsaCapi()
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 void |
engineInitVerify(java.security.PublicKey publicKey)
Deprecated.
Signature verification through CAPI is not supported
in this implementation, if this method is called it means there was an
error in the toolkit.
|
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.
|
protected boolean |
engineVerify(byte[] sigBytes)
Deprecated.
Signature verification through CAPI is not supported
in this implementation, if this method is called it means there was an
error in the toolkit.
|
byte[] |
getDigest()
Deprecated.
This method returns the bytes that were actually signed.
|
engineGetParameter, 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 DsaCapi()
protected void engineInitSign(java.security.PrivateKey privateKey)
throws java.security.InvalidKeyException
NullPointerException will be thrown.engineInitSign in class EntrustDSAprivateKey - 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 EntrustDSAjava.security.SignatureException - if any error occurs creating the signatureprotected final void engineInitVerify(java.security.PublicKey publicKey)
throws java.security.InvalidKeyException
engineInitVerify in class EntrustDSApublicKey - the DSA public key belonging to the DSA private key used for
signingjava.security.InvalidKeyException - alwaysprotected void engineUpdate(byte b)
throws java.security.SignatureException
engineUpdate in class EntrustDSAb - The byte to use for the updatejava.security.SignatureException - if there is a problem updating the message digest.protected void engineUpdate(byte[] b,
int offset,
int length)
throws java.security.SignatureException
engineUpdate in class EntrustDSAb - the array of bytesoffset - the offset to start from in the array of byteslength - the number of bytes to use, starting at offsetjava.security.SignatureException - if there is a problem updating the message digest.protected final boolean engineVerify(byte[] sigBytes)
throws java.security.SignatureException
engineVerify in class EntrustDSAsigBytes - the signature bytes to be verifiedtrue if signature is OK, false otherwisejava.security.SignatureException - alwaysEntrustDSA.engineVerify(byte[])public final byte[] getDigest()
Signature.sign()
or Signature.verify() is called.getDigest in interface ExtendedSignaturegetDigest in class EntrustDSA