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); }
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]); } }