| 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 |
|---|---|
BigInteger[] |
generateSignature(byte[] message)
generate a signature for the given message using the key we were
initialised with.
|
BigInteger |
getOrder()
Get the order of the group that the r, s values in signatures belong to.
|
void |
init(boolean forSigning,
CipherParameters param)
initialise the signer for signature generation or signature
verification.
|
protected SecureRandom |
initSecureRandom(boolean needed,
SecureRandom provided) |
boolean |
verifySignature(byte[] message,
BigInteger r,
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 BigInteger getOrder()
DSAExtpublic BigInteger[] generateSignature(byte[] message)
generateSignature in interface DSAmessage - the message that will be verified later.public boolean verifySignature(byte[] message,
BigInteger r,
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 SecureRandom initSecureRandom(boolean needed, SecureRandom provided)
Copyright © 2015–2020 The veraPDF Consortium. All rights reserved.