public void Get_G_H_Tests()
 {
     for (int i = 0; i < _parameters.Length; ++i)
     {
         GroupElement[]           bases = StaticHelperClass.GenerateRandomBases(2, i);
         GroupElement             value = _parameters[i].Generators[0];
         ClosedPedersenCommitment ped   = new ClosedPedersenCommitment(bases, value, _parameters[i].Group);
         Assert.AreEqual(bases[0], ped.G, "Failed to get G.");
         Assert.AreEqual(bases[1], ped.H, "Failed to get H.");
         Assert.IsTrue(ped.Validate());
     }
 }
        public void ClosedDLRepToClosedPedTest()
        {
            GroupElement[]            bases     = StaticHelperClass.GenerateRandomBases(2, 3);
            GroupElement              value     = StaticHelperClass.GenerateRandomValue(3);
            ClosedDLRepOfGroupElement udl       = new ClosedDLRepOfGroupElement(bases, value, _parameters[3].Group);
            ClosedPedersenCommitment  closedPed = new ClosedPedersenCommitment(udl);

            Assert.AreEqual(2, closedPed.RepresentationLength, "representation length should be 2");
            Assert.AreEqual(bases[0], closedPed.G, "G value should be bases[0]");
            Assert.AreEqual(bases[1], closedPed.H, "H value incorrect.");
            Assert.AreEqual(value, closedPed.Value, "value incorrect.");
            Assert.IsTrue(closedPed.Validate(), "should be valid closed pederson commitment.");
        }