Ejemplo n.º 1
0
        public bool Encrypt(byte[] data, out byte[] cipher, out byte[] hash)
        {
            var state = new RC4State();

            // Set seed
            hash = SHA1.Hash(data, Context);
            SetKey(state, workingKey, hash);

            cipher = new byte[data.Length];
            Encrypt(state, data, 0, data.Length, cipher, 0);
            return(true);
        }
Ejemplo n.º 2
0
 public virtual void Hash(byte[] input, out byte[] hash)
 {
     hash = SHA1.Hash(input, Context);
 }