infoservice.agreement.paxos.integration
Class CommitmentScheme

java.lang.Object
  extended by infoservice.agreement.paxos.integration.CommitmentScheme

public class CommitmentScheme
extends java.lang.Object


Constructor Summary
CommitmentScheme()
           
 
Method Summary
static Commitment createCommitment(java.lang.String a_value)
          Creates a Commitment for the given value.
static boolean verifyCommitment(java.lang.String a_commitment, java.lang.String a_reveal)
          Verifies the given commitment against the given reveal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CommitmentScheme

public CommitmentScheme()
Method Detail

createCommitment

public static Commitment createCommitment(java.lang.String a_value)
Creates a Commitment for the given value. A SecureRandom is computed and concatenated with the value. Then everything is hashed

Parameters:
a_value -
Returns:

verifyCommitment

public static boolean verifyCommitment(java.lang.String a_commitment,
                                       java.lang.String a_reveal)
Verifies the given commitment against the given reveal. Reveal gets hashed and compared to the commitment

Parameters:
a_commitment -
a_reveal -
Returns: