|
|||||||||
| 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
|
+--de.flexiprovider.core.dsa.interfaces.DSASignature
|
+--de.flexiprovider.core.dsa.DSASignature
| Inner Class Summary | |
static class |
DSASignature.Raw
Inner class providing DSA without message digest |
static class |
DSASignature.SHA1
DSA with SHA1. |
static class |
DSASignature.SHA224
DSA with SHA224. |
static class |
DSASignature.SHA256
DSA with SHA256. |
static class |
DSASignature.SHA384
DSA with SHA384. |
static class |
DSASignature.SHA512
DSA with SHA512. |
| Fields inherited from class java.security.SignatureSpi |
appRandom |
| Constructor Summary | |
protected |
DSASignature(MessageDigest md)
Constructor. |
| Method Summary | |
void |
initSign(PrivateKey privKey,
SecureRandom random)
Initialize the signature algorithm for signing a message. |
void |
initVerify(PublicKey pubKey)
Initialize the signature algorithm for verifying a signature. |
void |
setParameters(AlgorithmParameterSpec params)
Initialize this signature engine with the specified parameter set. |
byte[] |
sign()
Signs a message. |
void |
update(byte b)
Pass a message byte to the message digest. |
void |
update(byte[] b,
int offset,
int length)
Pass message bytes to the message digest. |
boolean |
verify(byte[] sigBytes)
Verifies a signature. |
| Methods inherited from class de.flexiprovider.core.dsa.interfaces.DSASignature |
engineSetParameter |
| Methods inherited from class de.flexiprovider.api.Signature |
engineGetParameter, engineInitSign, engineInitSign, engineInitVerify, engineSetParameter, engineSign, engineUpdate, engineUpdate, engineVerify, engineVerify, initSign, sign, update, verify, verify, verify |
| Methods inherited from class java.security.SignatureSpi |
clone, engineSign |
| Methods inherited from class java.lang.Object |
|
| Constructor Detail |
protected DSASignature(MessageDigest md)
md - the message digest to use| Method Detail |
public void initSign(PrivateKey privKey,
SecureRandom random)
throws InvalidKeyException
initSign in class SignatureprivKey - the private key of the signerrandom - the source of randomnessInvalidKeyException - if the key is not an instance of DSAPrivKey.
public void initVerify(PublicKey pubKey)
throws InvalidKeyException
initVerify in class SignaturepubKey - the public key of the signer.InvalidKeyException - if the public key is not an instance of DSAPubKey.
public void setParameters(AlgorithmParameterSpec params)
throws InvalidAlgorithmParameterException
setParameters in class Signatureparams - the parametersInvalidAlgorithmParameterException - if the given parameters are inappropriate for this signature
enginepublic void update(byte b)
update in class Signatureb - the message byte
public void update(byte[] b,
int offset,
int length)
update in class Signatureb - the message byteoffset - the index where the message bytes startslength - the number of message bytes
public byte[] sign()
throws SignatureException
sign in class SignatureSignatureException - if the signature is not initialized properly.public boolean verify(byte[] sigBytes)
verify in class SignaturesigBytes - the signature to be verified
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||