Added support for iv as Buffer