ENCRYPT: allow selecting a key algorithm and specifying an IV parameter