Validate the IV/nonce length for a given algorithm.

Fixes #159