|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.security.SignatureSpi
|
+--de.flexiprovider.api.Signature
This class defines the Service Provider Interface (SPI) for the Signature class, which is used to provide the functionality of a digital signature algorithm. Digital signatures are used for authentication and integrity assurance of digital data. .
All the abstract methods in this class must be implemented by each cryptographic service provider who wishes to supply the implementation of a particular signature algorithm.
| Fields inherited from class java.security.SignatureSpi |
appRandom |
| Constructor Summary | |
Signature()
|
|
| Method Summary | |
protected java.lang.Object |
engineGetParameter(java.lang.String param)
Deprecated. |
protected void |
engineInitSign(java.security.PrivateKey privateKey)
|
protected void |
engineInitSign(java.security.PrivateKey privateKey,
java.security.SecureRandom javaRand)
|
protected void |
engineInitVerify(java.security.PublicKey publicKey)
|
protected void |
engineSetParameter(java.security.spec.AlgorithmParameterSpec params)
|
protected void |
engineSetParameter(java.lang.String param,
java.lang.Object value)
Deprecated. |
protected byte[] |
engineSign()
|
protected void |
engineUpdate(byte b)
|
protected void |
engineUpdate(byte[] b,
int off,
int len)
|
protected boolean |
engineVerify(byte[] sigBytes)
|
protected boolean |
engineVerify(byte[] sigBytes,
int offset,
int length)
|
void |
initSign(PrivateKey privKey)
Initialize the signature with the specified private key for signing operations. |
abstract void |
initSign(PrivateKey privKey,
SecureRandom random)
Initialize the signature with the specified private key and source of randomness for signing operations. |
abstract void |
initVerify(PublicKey pubKey)
Initialize the signature with the specified public key for verification operations. |
abstract void |
setParameters(AlgorithmParameterSpec params)
Initialize the signature with the specified parameters. |
abstract byte[] |
sign()
Return the signature of all the data updated so far. |
byte[] |
sign(byte[] input)
Update the data to be signed and return the signature of all the data updated so far. |
abstract void |
update(byte input)
Update the data to be signed or verified using the specified byte. |
void |
update(byte[] input)
Update the data to be signed or verified using the specified byte array. |
abstract void |
update(byte[] input,
int inOff,
int inLen)
Update the data to be signed or verified, using the specified byte array of the specified length, starting at the specified offset. |
abstract boolean |
verify(byte[] signature)
Verify the passed-in signature of the specified message. |
boolean |
verify(byte[] input,
byte[] signature)
Update the data to be verified and verify the passed-in signature. |
boolean |
verify(byte[] input,
byte[] signature,
int sigOff,
int sigLen)
Update the data to be verified and verify the passed-in signature. |
boolean |
verify(byte[] signature,
int sigOff,
int sigLen)
Verify the passed-in signature. |
| Methods inherited from class java.security.SignatureSpi |
clone, engineSign |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
public Signature()
| Method Detail |
protected final java.lang.Object engineGetParameter(java.lang.String param)
throws java.security.InvalidParameterException
engineGetParameter in class java.security.SignatureSpi
protected final void engineSetParameter(java.lang.String param,
java.lang.Object value)
throws java.security.InvalidParameterException
engineSetParameter in class java.security.SignatureSpi
protected final void engineInitSign(java.security.PrivateKey privateKey)
throws java.security.InvalidKeyException
engineInitSign in class java.security.SignatureSpi
protected final void engineInitSign(java.security.PrivateKey privateKey,
java.security.SecureRandom javaRand)
throws java.security.InvalidKeyException
engineInitSign in class java.security.SignatureSpi
protected final void engineInitVerify(java.security.PublicKey publicKey)
throws java.security.InvalidKeyException
engineInitVerify in class java.security.SignatureSpi
protected void engineSetParameter(java.security.spec.AlgorithmParameterSpec params)
throws java.security.InvalidAlgorithmParameterException
engineSetParameter in class java.security.SignatureSpi
protected final void engineUpdate(byte b)
throws java.security.SignatureException
engineUpdate in class java.security.SignatureSpi
protected final void engineUpdate(byte[] b,
int off,
int len)
throws java.security.SignatureException
engineUpdate in class java.security.SignatureSpi
protected final byte[] engineSign()
throws java.security.SignatureException
engineSign in class java.security.SignatureSpi
protected final boolean engineVerify(byte[] sigBytes)
throws java.security.SignatureException
engineVerify in class java.security.SignatureSpi
protected final boolean engineVerify(byte[] sigBytes,
int offset,
int length)
throws java.security.SignatureException
public final void initSign(PrivateKey privKey)
throws InvalidKeyException
privKey - the private key of the identity whose signature will be
generated.InvalidKeyException - if the key is invalid for initializing the signature.
public abstract void initSign(PrivateKey privKey,
SecureRandom random)
throws InvalidKeyException
privKey - the private key of the identity whose signature will be
generated.random - the source of randomnessInvalidKeyException - if the key is invalid for initializing the signature.
public abstract void initVerify(PublicKey pubKey)
throws InvalidKeyException
pubKey - the public key of the identity whose signature is going to
be verifiedInvalidKeyException - if the key is invalid for initializing the signature.
public abstract void setParameters(AlgorithmParameterSpec params)
throws InvalidAlgorithmParameterException
params - the parametersInvalidAlgorithmParameterException - if the given parameters are inappropriate for this
signature.
public abstract void update(byte input)
throws SignatureException
input - the data byteSignatureException - if the engine is not initialized properly.
public final void update(byte[] input)
throws SignatureException
input - the data byte arraySignatureException - if the engine is not initialized properly.
public abstract void update(byte[] input,
int inOff,
int inLen)
throws SignatureException
input - the data byte arrayinOff - the offset to start from in the array of bytesinLen - the number of bytes to use, starting at inOffSignatureException - if the engine is not initialized properly
public abstract byte[] sign()
throws SignatureException
SignatureException - if the engine is not initialized properly.
public final byte[] sign(byte[] input)
throws SignatureException
input - the data byte arraySignatureException - if the engine is not initialized properly.
public abstract boolean verify(byte[] signature)
throws SignatureException
signature - the signatureSignatureException - if the engine is not initialized properly or the
passed-in signature is improperly encoded or of the wrong
type.
public final boolean verify(byte[] input,
byte[] signature)
throws SignatureException
input - the data byte arraysignature - the signatureSignatureException - if the engine is not initialized properly or the
passed-in signature is improperly encoded or of the wrong
type.
public final boolean verify(byte[] signature,
int sigOff,
int sigLen)
throws SignatureException
signature - the signaturesigOff - the offset where the signature startssigLen - the length of the signatureSignatureException - if the engine is not initialized properly or the
passed-in signature is improperly encoded or of the wrong
type.
public final boolean verify(byte[] input,
byte[] signature,
int sigOff,
int sigLen)
throws SignatureException
input - the data byte arraysignature - the signaturesigOff - the offset where the signature startssigLen - the length of the signatureSignatureException - if the engine is not initialized properly or the
passed-in signature is improperly encoded or of the wrong
type.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||