예제 #1
0
        public void CreateBalloons()
        {
            for(int i = 0; i < Options.NumBalloons; i++)
            {
                Balloon balloon = new Balloon()
                {
                    Id = NextId + i,
                    IsFilled = false,
                    SignedBy = MyProcessInfo.ProcessId
                };

                byte[] bytes = balloon.DataBytes();
                byte[] hash = Hasher.ComputeHash(bytes);

                balloon.DigitalSignature = rsaSigner.CreateSignature(hash);

                Balloons.AddOrUpdate(balloon);
            }
        }