public void TestValidateCommitmentValid() { var signatureService = new MultiSignature(_sepSecp256K1); var commitment = signatureService.ComputeCommitment(signatureService.ComputeCommitmentSecret()); var commitmentHash = signatureService.ComputeCommitmentHash(commitment); Assert.IsTrue(signatureService.ValidateCommitment(commitment, commitmentHash)); }
public void TestComputeCommitmentHash() { var signatureService = new MultiSignature(_sepSecp256K1); var commitment = signatureService.ComputeCommitment(signatureService.ComputeCommitmentSecret()); var commitmentHash = signatureService.ComputeCommitmentHash(commitment); Assert.AreNotEqual(commitment, commitmentHash); }