Make sure key, iv are strings