public abstract class DnieECDSASignatureSpi
extends java.security.SignatureSpi
Modifier and Type | Class and Description |
---|---|
static class |
DnieECDSASignatureSpi.None
NONEwithECDSA signature.
|
static class |
DnieECDSASignatureSpi.Sha1
SHA1withECDSA signature.
|
static class |
DnieECDSASignatureSpi.Sha256
SHA256withECDSA signature.
|
static class |
DnieECDSASignatureSpi.Sha384
SHA384withECDSA signature.
|
static class |
DnieECDSASignatureSpi.Sha512
SHA512withECDSA signature.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
engineGetParameter(java.lang.String param)
Gets the value of the specified algorithm parameter.
|
protected void |
engineInitSign(java.security.PrivateKey privateKey)
Initializes this signature object with the specified
private key for signing operations.
|
protected void |
engineInitVerify(java.security.PublicKey publicKey)
Initializes this signature object with the specified
public key for verification operations.
|
protected void |
engineSetParameter(java.lang.String param,
java.lang.Object value)
Sets the specified algorithm parameter to the specified
value.
|
protected byte[] |
engineSign()
Returns the signature bytes of all the data
updated so far.
|
protected void |
engineUpdate(byte b)
Updates the data to be signed or verified
using the specified byte.
|
protected void |
engineUpdate(byte[] b,
int off,
int len)
Updates the data to be signed or verified, using the
specified array of bytes, starting at the specified offset.
|
protected boolean |
engineVerify(byte[] sigBytes)
Verifies the passed-in signature.
|
protected byte[] |
fitMessage(java.security.spec.ECParameterSpec params,
byte[] message) |
protected void engineInitSign(java.security.PrivateKey privateKey) throws java.security.InvalidKeyException
engineInitSign
in class java.security.SignatureSpi
privateKey
- the private key of the identity whose signature
will be generated.java.security.InvalidKeyException
- if the key is improperly
encoded, parameters are missing, and so on.protected byte[] engineSign() throws java.security.SignatureException
engineSign
in class java.security.SignatureSpi
java.security.SignatureException
- if the engine is not
initialized properly or if this signature algorithm is unable to
process the input data provided.protected byte[] fitMessage(java.security.spec.ECParameterSpec params, byte[] message)
params
- message
- protected void engineUpdate(byte b)
engineUpdate
in class java.security.SignatureSpi
b
- the byte to use for the update.protected void engineUpdate(byte[] b, int off, int len)
engineUpdate
in class java.security.SignatureSpi
b
- the array of bytesoff
- the offset to start from in the array of byteslen
- the number of bytes to use, starting at offsetprotected void engineInitVerify(java.security.PublicKey publicKey) throws java.security.InvalidKeyException
engineInitVerify
in class java.security.SignatureSpi
publicKey
- the public key of the identity whose signature is
going to be verified.java.security.InvalidKeyException
- if the key is improperly
encoded, parameters are missing, and so on.protected boolean engineVerify(byte[] sigBytes) throws java.security.SignatureException
engineVerify
in class java.security.SignatureSpi
sigBytes
- the signature bytes to be verified.java.security.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.protected void engineSetParameter(java.lang.String param, java.lang.Object value)
engineSetParameter
in class java.security.SignatureSpi
param
- the string identifier of the parameter.value
- the parameter value.protected java.lang.Object engineGetParameter(java.lang.String param)
engineGetParameter
in class java.security.SignatureSpi
param
- the string name of the parameter.