コード例 #1
0
        protected static ISAAC PrepareISAAC(byte[] seed)
        {
            ISAAC rnd = new ISAAC();

            rnd.Isaac();
            for (int i = 0; i < ISAAC.SIZE; i++)
            {
                rnd.mem[i] ^= seed[i % seed.Length];
            }
            for (int i = 0; i < 3; i++)
            {
                rnd.Isaac();
            }

            return(rnd);
        }
コード例 #2
0
        protected void PrepareKey(byte[] pass)
        {
            rnd = SteganographyProvider.PrepareISAAC(pass);

            for (int i = 0, isaac = 0; i < key.Length; i++, isaac++)
            {
                if (isaac >= ISAAC.SIZE)
                {
                    isaac = 0;
                    rnd.Isaac();
                }

                key[i] = (byte)(key[i] ^ rnd.rsl[isaac]);
            }
        }