Merge pull request #860 from ronald-cron-arm/fix-cipher-iv_2.x

Backport 2.x: Avoid using encryption output buffer to pass generated IV to PSA driver