| Constructor and Description |
|---|
DSASigner()
Default configuration, random K values.
|
DSASigner(DSAKCalculator kCalculator)
Configuration with an alternate, possibly deterministic calculator of K.
|
| Modifier and Type | Method and Description |
|---|---|
java.math.BigInteger[] |
generateSignature(byte[] message)
generate a signature for the given message using the key we were
initialised with.
|
void |
init(boolean forSigning,
CipherParameters param)
initialise the signer for signature generation or signature
verification.
|
protected java.security.SecureRandom |
initSecureRandom(boolean needed,
java.security.SecureRandom provided) |
boolean |
verifySignature(byte[] message,
java.math.BigInteger r,
java.math.BigInteger s)
return true if the value r and s represent a DSA signature for
the passed in message for standard DSA the message should be a
SHA-1 hash of the real message to be verified.
|
public DSASigner()
public DSASigner(DSAKCalculator kCalculator)
kCalculator - a K value calculator.public void init(boolean forSigning,
CipherParameters param)
DSApublic java.math.BigInteger[] generateSignature(byte[] message)
generateSignature in interface DSAmessage - the message that will be verified later.public boolean verifySignature(byte[] message,
java.math.BigInteger r,
java.math.BigInteger s)
verifySignature in interface DSAmessage - the message that was supposed to have been signed.r - the r signature value.s - the s signature value.protected java.security.SecureRandom initSecureRandom(boolean needed,
java.security.SecureRandom provided)