Top Description Methods
org.bouncycastle.crypto

public Interface Committer

Known Direct Implementers
org.bouncycastle.crypto.commitments.GeneralHashCommitter, org.bouncycastle.crypto.commitments.HashCommitter

General interface fdr classes that produce and validate commitments.

Method Summary

Modifier and TypeMethod and Description
public Commitment

Returns:

a Commitment
commit
(byte[]
the message to be committed to,
message
)

Generate a commitment for the passed in message.

public boolean

Returns:

true if commitment matches message, false otherwise.
isRevealed
(Commitment
a commitment previously generated.
commitment
,
byte[]
the message that was expected to have been committed to.
message
)

Return true if the passed in commitment represents a commitment to the passed in maessage.

Method Detail

commitback to summary
public Commitment commit(byte[] message)

Generate a commitment for the passed in message.

Parameters
message:byte[]

the message to be committed to,

Returns:Commitment

a Commitment

isRevealedback to summary
public boolean isRevealed(Commitment commitment, byte[] message)

Return true if the passed in commitment represents a commitment to the passed in maessage.

Parameters
commitment:Commitment

a commitment previously generated.

message:byte[]

the message that was expected to have been committed to.

Returns:boolean

true if commitment matches message, false otherwise.