Modifier and Type | Field and Description |
---|---|
private Digest |
digest |
private DSA |
dsaSigner |
private boolean |
forSigning |
Constructor and Description |
---|
DSADigestSigner(DSA signer,
Digest digest) |
Modifier and Type | Method and Description |
---|---|
private java.math.BigInteger[] |
derDecode(byte[] encoding) |
private byte[] |
derEncode(java.math.BigInteger r,
java.math.BigInteger s) |
byte[] |
generateSignature()
Generate a signature for the message we've been loaded with using
the key we were initialised with.
|
void |
init(boolean forSigning,
CipherParameters parameters)
Initialise the signer for signing or verification.
|
void |
reset()
reset the internal state
|
void |
update(byte input)
update the internal digest with the byte b
|
void |
update(byte[] input,
int inOff,
int length)
update the internal digest with the byte array in
|
boolean |
verifySignature(byte[] signature)
return true if the internal state represents the signature described
in the passed in array.
|
private final Digest digest
private final DSA dsaSigner
private boolean forSigning
public void init(boolean forSigning, CipherParameters parameters)
Signer
public void update(byte input)
public void update(byte[] input, int inOff, int length)
public byte[] generateSignature()
generateSignature
in interface Signer
public boolean verifySignature(byte[] signature)
Signer
verifySignature
in interface Signer
public void reset()
Signer
private byte[] derEncode(java.math.BigInteger r, java.math.BigInteger s) throws java.io.IOException
java.io.IOException
private java.math.BigInteger[] derDecode(byte[] encoding) throws java.io.IOException
java.io.IOException