Skip to main content

commit_with_opening

Function commit_with_opening 

Source
pub fn commit_with_opening(
    context: &str,
    value: &[u8],
    opening: &Opening,
) -> Commitment
Expand description

Derive a commitment from a value and an explicit opening (deterministic).

Use this to recompute a commitment during verification, or when the opening is generated elsewhere. To create a fresh commitment, prefer commit, which samples the opening from the OS CSPRNG.