示例#1
0
        /// <summary>
        /// Begin summation of votes.
        /// </summary>
        public void TallyBegin(
            VotingMaterial votingMaterial,
            int checkProofCount)
        {
            if (votingMaterial == null)
            throw new ArgumentNullException("votingMaterial");

              if (!SetVotingMaterial(votingMaterial))
            throw new PiArgumentException(ExceptionCode.BadVotingMaterial, "Bad voting material");

              this.tally = new Tally(this.parameters, CertificateStorage, this.publicKey, checkProofCount);
        }
示例#2
0
        /// <summary>
        /// Resets the vote sum.
        /// </summary>
        /// <param name="votingMaterial">Voting material.</param>
        public void TallyBegin(VotingMaterial votingMaterial)
        {
            if (votingMaterial == null)
            throw new ArgumentNullException("votingMaterial");

              BigInt publicKey = CalculatePublicKey(votingMaterial);

              this.tally = new Tally(this.parameters, this.certificateStorage, publicKey, BaseParameters.StandardProofCount);
        }