Exemplo n.º 1
0
        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));
        }
Exemplo n.º 2
0
        public void TestComputeCommitmentHash()
        {
            var signatureService = new MultiSignature(_sepSecp256K1);
            var commitment       = signatureService.ComputeCommitment(signatureService.ComputeCommitmentSecret());
            var commitmentHash   = signatureService.ComputeCommitmentHash(commitment);

            Assert.AreNotEqual(commitment, commitmentHash);
        }