EcdsaWithSha1Signature
insteadpublic class EntrustECDSA extends java.security.Signature implements ExtendedSignature
EntrustECDSA is the ECDSA signature class that allows ECDSA
signatures to be signed and verified.
Do not use this class directly use the
java.security.Signature class.
| Modifier and Type | Field and Description |
|---|---|
static ObjectID |
ecdsa
Deprecated.
Object identifier for
ecdsa is 1.2.840.10045.4 |
static ObjectID |
ecdsaWithSHA1
Deprecated.
Object identifier for
ecdsaWithSHA1 is 1.2.840.10045.4.1 |
| Constructor and Description |
|---|
EntrustECDSA()
Deprecated.
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Object |
engineGetParameter(java.lang.String param)
Deprecated.
Retrieves the value of the specified algorithm parameter.
|
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.
Initializes this signature object with the specified public key for
verification operations.
|
protected void |
engineSetParameter(java.security.spec.AlgorithmParameterSpec params)
Deprecated.
Initializes the signature engine with the specified parameter.
|
protected void |
engineSetParameter(java.lang.String param,
java.lang.Object value)
Deprecated.
Sets the specified algorithm parameter to the specified value.
|
protected byte[] |
engineSign()
Deprecated.
Returns the signature byte array containing all of the updated data.
|
protected void |
engineUpdate(byte b)
Deprecated.
Updates the data to be signed or verified using the specified byte.
|
protected void |
engineUpdate(byte[] b,
int off,
int len)
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.
Verifies the signature.
|
byte[] |
getDigest()
Deprecated.
Returns the digest that was calculated during signature generation or
verification.
|
clone, getAlgorithm, getInstance, getInstance, getInstance, getParameter, getParameters, getProvider, initSign, initSign, initVerify, initVerify, setParameter, setParameter, sign, sign, toString, update, update, update, update, verify, verifypublic static final ObjectID ecdsaWithSHA1
ecdsaWithSHA1 is 1.2.840.10045.4.1public static final ObjectID ecdsa
ecdsa is 1.2.840.10045.4protected void engineInitVerify(java.security.PublicKey publicKey)
throws java.security.InvalidKeyException
engineInitVerify in class java.security.SignatureSpipublicKey - the public key of the identity whose signature is to be
verifiedjava.security.InvalidKeyException - if the key type is wrong (if it is not an
ECDSAPublicKey object, for example)protected void engineInitSign(java.security.PrivateKey privateKey)
throws java.security.InvalidKeyException
engineInitSign in class java.security.SignatureSpiprivateKey - the private key of the identity whose signature is to be
generatedjava.security.InvalidKeyException - if the key is not of type
EcConfinedPrivateKey (with algorithm ECDSA)
or of type ECDSAPrivateKeyprotected void engineUpdate(byte b)
throws java.security.SignatureException
engineUpdate in class java.security.SignatureSpib - the byte to use for the update operationjava.security.SignatureException - if off and len are larger than the size of b.protected void engineUpdate(byte[] b,
int off,
int len)
throws java.security.SignatureException
engineUpdate in class java.security.SignatureSpib - the byte arrayoff - the offset from which to start (in the byte array)len - the number of bytes to use, starting at offsetjava.security.SignatureException - if off and len are larger than the size of b.protected byte[] engineSign()
throws java.security.SignatureException
The format of the signature is a DER encoded ASN1 structure as defined in X9.62 (a SEQUENCE consisting of two INTEGER components).
engineSign in class java.security.SignatureSpijava.security.SignatureException - if the engine is not properly initializedprotected boolean engineVerify(byte[] sigBytes)
throws java.security.SignatureException
engineVerify in class java.security.SignatureSpisigBytes - the signature byte array to be verifiedtrue if the signature is valid
false otherwisejava.security.SignatureException - if the engine is not properly initialized, or if the
signature is improperly encoded or of the wrong typeprotected void engineSetParameter(java.lang.String param,
java.lang.Object value)
throws java.security.InvalidParameterException
engineSetParameter in class java.security.SignatureSpijava.security.InvalidParameterException - always thrownprotected void engineSetParameter(java.security.spec.AlgorithmParameterSpec params)
throws java.security.InvalidAlgorithmParameterException
engineSetParameter in class java.security.SignatureSpijava.security.InvalidAlgorithmParameterException - always thrownprotected java.lang.Object engineGetParameter(java.lang.String param)
throws java.security.InvalidParameterException
InvalidParameterException.engineGetParameter in class java.security.SignatureSpijava.security.InvalidParameterException - always thrown for security reasonspublic byte[] getDigest()
ExtendedSignature
During both a signature generation and verification operation a digest is
calculated over the message; this digest is then used as an input to the
signature generation or verification process. This API simply provides
access to the digest once it has been calculated; it always returns the
digest from the last operation. If a signature generation or verification
operation has not yet been executed or is in the process of being
executed, null is returned.
To ensure a non-null result, this method should only be called after
Signature.sign() or Signature.verify() has
called.
getDigest in interface ExtendedSignature