abstract class DnieRSASignatureSpi
extends java.security.SignatureSpi
Modifier and Type | Class and Description |
---|---|
static class |
DnieRSASignatureSpi.None
Firma NONEwithRSA.
|
static class |
DnieRSASignatureSpi.Sha1
Firma SHA1withRSA.
|
static class |
DnieRSASignatureSpi.Sha256
Firma SHA256withRSA.
|
static class |
DnieRSASignatureSpi.Sha384
Firma SHA384withRSA.
|
static class |
DnieRSASignatureSpi.Sha512
Firma SHA512withRSA.
|
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 java.lang.Object engineGetParameter(java.lang.String param)
engineGetParameter
in class java.security.SignatureSpi
param
- the string name of the parameter.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 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 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 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 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 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.