Esempio n. 1
0
        void Upload()
        {
            Code   = Output(checkByQ.GenerateCode());
            Q      = checkByQ.q;
            N      = checkByQ.n;
            Decode = Output(checkByQ.Code(code, q));
            Random rand = new Random();

            if (rand.Next(0, 100) < 50)
            {
                correct = true;
            }
            else
            {
                decode  = checkByQ.WrongCode(decode);
                correct = false;
            }
        }
Esempio n. 2
0
        public CheckByQViewModel()
        {
            checkByQ = new CheckByQ();
            code     = checkByQ.GenerateCode();
            Q        = checkByQ.q;
            N        = checkByQ.n;
            decode   = checkByQ.Code(code, q);
            Random rand = new Random();

            if (rand.Next(0, 100) < 50)
            {
                correct = true;
            }
            else
            {
                decode  = checkByQ.WrongCode(decode);
                correct = false;
            }
            //coded = checkByQ.Code(code, Q);
        }