public static InputStream decrypt ( InputStream inputStream , byte [ ] key ) { checkNotNull ( inputStream ) ; checkNotNull ( key ) ; checkArgument ( key . length >= 5 && key . length <= 256 ) ; StreamCipher rc4 = new RC4Engine ( ) ; rc4 . init ( false , new KeyParameter ( key ) ) ; return new CipherInputStream ( inputStream , rc4 ) ; }
Decrypt input stream using RC4