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); }
public virtual void Hash(byte[] input, out byte[] hash) { hash = SHA1.Hash(input, Context); }