iv-gen: Add a generic constructor to create an IV gen from an algorithm