Пример #1
0
        public shared_secret(UInt16 required)
        {
            if (required < 2)
            {
                throw new Exception("Incorrect share or required count");
            }

            _shares    = 0;
            _required  = required;
            _rand_bits = new random_bits(64);
        }
Пример #2
0
        public shared_secret(UInt16 shares, UInt16 required)
        {
            if (shares > max_shares || required > shares || required < 2)
            {
                throw new Exception("Incorrect share or required count");
            }

            _shares       = shares;
            _required     = required;
            _coefficients = new UInt16[required];
            _rand_bits    = new random_bits(64);
        }