title: AES Encryption -Key Generation with OpenSSL
body: <p>As a reference and as continuation to the post:
  <a href="https://stackoverflow.com/questions/5136279/how-to-use-openssl-to-decrypt-java-aes-encrypted-data">how to use OpenSSL to decrypt Java AES-encrypted data?</a></p>
  
  <p>I have the following questions.</p>
  
  <p>I am using OpenSSL libs and programming in C for encrypting data in aes-cbc-128.
  I am given any input binary data and I have to encrypt this.</p>
  
  <p>I learn that Java has a CipherParameters interface to set IV and KeyParameters too.</p>
  
  <p>Is there a way to generate IV and a key using openSSL? In short how could one use in a C program to call the random generator of openSSL for these purposes. Can any of you provide some docs/examples/links on this?</p>
  
  <p>Thanks</p>