Пример #1
0
        public ISAAC Copy()
        {
            ISAAC newCopy = new ISAAC(null);

            newCopy.SetInternalState(offset, a, b, c, mm, randRsl, ancestry);
            return(newCopy);
        }
Пример #2
0
        private void SetInternalState(uint offset, uint a, uint b, uint c, uint[] mm, uint[] randRsl, System.Collections.Generic.Queue <ISAAC> ancestry)
        {
            SetInternalState(offset, a, b, c, mm, randRsl);
            var g = ancestry.ToArray();
            var f = new ISAAC[g.Length];

            Array.Copy(g, f, g.Length);
            this.ancestry = new System.Collections.Generic.Queue <ISAAC>(f);
        }
Пример #3
0
 public CryptoSystem(byte[] seed)
 {
     if (seed == null)
     {
         throw new ArgumentNullException("seed can not be null");
     }
     if (seed.Length != 4)
     {
         throw new ArgumentOutOfRangeException("seed length is wrong");
     }
     Wheel = new ISAAC(seed);
 }