| Constructor and Description |
|---|
HSSSigner() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
generateSignature()
generate a signature for the message we've been loaded with using
the key we were initialised with.
|
byte[] |
generateSignature(byte[] message)
Sign the passed in message.
|
void |
init(boolean forSigning,
CipherParameters param)
Initialise for signing or verification.
|
void |
reset()
reset the internal state
|
void |
update(byte b)
Absorb a byte of the message to be signed or verified.
|
void |
update(byte[] in,
int off,
int len)
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.
|
boolean |
verifySignature(byte[] message,
byte[] signature)
Verify the passed in signature against the passed in message.
|
public void init(boolean forSigning,
CipherParameters param)
ParametersWithRandom wrapper is accepted
and unwrapped, so a caller that supplies a random - as the operator builders do whenever
setSecureRandom() has been called - is not refused; the random itself is not used. The
message randomiser C is derived from the key's seed and the one-time index (RFC 8554
sec. 4.2, following the reference implementation), so it is deterministic and cannot repeat
while q does not.init in interface SignerforSigning - true for signing, false for verification.param - the key, optionally wrapped in ParametersWithRandom.public byte[] generateSignature(byte[] message)
update(byte) is
refused rather than silently discarding it - call reset() first, or use
generateSignature() to sign what was buffered.message - the message to be signed.java.lang.IllegalStateException - if a buffered message is present, or the signer is not
initialised for signing.public boolean verifySignature(byte[] message,
byte[] signature)
update(byte) is refused rather than silently discarding it - call
reset() first, or use verifySignature(byte[]) to verify what was
buffered.message - the message the signature is claimed to be over.signature - the candidate signature.java.lang.IllegalStateException - if a buffered message is present, or the signer is not
initialised for verification.public void update(byte b)
generateSignature() / verifySignature(byte[]), which reset the buffer.public void update(byte[] in,
int off,
int len)
Signerpublic byte[] generateSignature()
SignergenerateSignature in interface Signerpublic boolean verifySignature(byte[] signature)
SignerverifySignature in interface Signer