main.c: main_set_iv: fix nonce creation bug
main: add iv_length to main_params, add and use main_write_bytes_hex to print iv and key