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