public class SM2Signer extends java.lang.Object implements DSA, ECConstants
Constructor and Description |
---|
SM2Signer() |
Modifier and Type | Method and Description |
---|---|
protected java.math.BigInteger |
calculateE(byte[] message) |
protected ECMultiplier |
createBasePointMultiplier() |
java.math.BigInteger[] |
generateSignature(byte[] message)
sign the passed in message (usually the output of a hash function).
|
void |
init(boolean forSigning,
CipherParameters param)
initialise the signer for signature generation or signature
verification.
|
boolean |
verifySignature(byte[] message,
java.math.BigInteger r,
java.math.BigInteger s)
verify the message message against the signature values r and s.
|
public void init(boolean forSigning, CipherParameters param)
DSA
public java.math.BigInteger[] generateSignature(byte[] message)
DSA
generateSignature
in interface DSA
message
- the message to be signed.public boolean verifySignature(byte[] message, java.math.BigInteger r, java.math.BigInteger s)
DSA
verifySignature
in interface DSA
message
- the message that was supposed to have been signed.r
- the r signature value.s
- the s signature value.protected ECMultiplier createBasePointMultiplier()
protected java.math.BigInteger calculateE(byte[] message)