Esempio n. 1
0
        public void LockBallotToChain(ECSKey key, byte[] previousBallotHash)
        {
            PreviousBallotHash = previousBallotHash;
            SHA256Managed hashstring = new SHA256Managed();

            BallotHash          = hashstring.ComputeHash(GetBallotHashingData());
            BallotHashSignature = key.Sign(BallotHash);
            LockDate            = DateTime.UtcNow;
        }
Esempio n. 2
0
 public void SignSecret(ECSKey key, string secret)
 {
     SecretSignature  = key.Sign(UTF8Encoding.Unicode.GetBytes(secret));
     SigningPublicKey = key.PublicKey;
 }
Esempio n. 3
0
 public void SignBallot(ECSKey key)
 {
     BallotSignature  = key.Sign(UTF8Encoding.Unicode.GetBytes(BallotData));
     SigningPublicKey = key.PublicKey;
 }
Esempio n. 4
0
 public void SignSecret(ECSKey key, string secret)
 {
     SecretSignature = key.Sign(UTF8Encoding.Unicode.GetBytes(secret));
     SigningPublicKey = key.PublicKey;
 }
Esempio n. 5
0
 public void SignBallot(ECSKey key)
 {
     BallotSignature = key.Sign(UTF8Encoding.Unicode.GetBytes(BallotData));
     SigningPublicKey = key.PublicKey;
 }
Esempio n. 6
0
 public void LockBallotToChain(ECSKey key, byte[] previousBallotHash)
 {
     PreviousBallotHash = previousBallotHash;
     SHA256Managed hashstring = new SHA256Managed();
     BallotHash = hashstring.ComputeHash(GetBallotHashingData());
     BallotHashSignature = key.Sign(BallotHash);
     LockDate = DateTime.UtcNow;
 }