|
Bouncy Castle Cryptography Library 1.49 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.bouncycastle.crypto.commitments.HashCommitter
public class HashCommitter
A basic hash-committer as described in "Making Mix Nets Robust for Electronic Voting by Randomized Partial Checking", by Jakobsson, Juels, and Rivest (11th Usenix Security Symposium, 2002).
Constructor Summary | |
---|---|
HashCommitter(ExtendedDigest digest,
java.security.SecureRandom random)
Base Constructor. |
Method Summary | |
---|---|
Commitment |
commit(byte[] message)
Generate a commitment for the passed in message. |
boolean |
isRevealed(Commitment commitment,
byte[] message)
Return true if the passed in commitment represents a commitment to the passed in maessage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HashCommitter(ExtendedDigest digest, java.security.SecureRandom random)
digest
- digest to use for creating commitments.random
- source of randomness for generating secrets.Method Detail |
---|
public Commitment commit(byte[] message)
commit
in interface Committer
message
- the message to be committed to,
public boolean isRevealed(Commitment commitment, byte[] message)
isRevealed
in interface Committer
commitment
- a commitment previously generated.message
- the message that was expected to have been committed to.
|
Bouncy Castle Cryptography Library 1.49 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |