コード例 #1
0
ファイル: ISAAC.cs プロジェクト: zegegerslittlesis/ACE
        public ISAAC Copy()
        {
            ISAAC newCopy = new ISAAC(null);

            newCopy.SetInternalState(offset, a, b, c, mm, randRsl, ancestry);
            return(newCopy);
        }
コード例 #2
0
ファイル: ISAAC.cs プロジェクト: zegegerslittlesis/ACE
        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);
 }