title: C/C++ program with the same output as /usr/bin/openssl
body: <p>My goal is to create a C/C++ program which encrypts/decypts data (to a file) which is compatible with the standard OpenSSL binary utility.  Ideally an administrator would be able to encrypt text using the command <code>"/usr/bin/openssl enc -aes-128-cbc -in input.txt -k password -a "</code>   ...and then a C/C++ program would be capable of decrypting the base64 hash.</p>
  
  <p>Unfortunately, there are very few examples of AES encryption with OpenSSL and it isn't clear what the default parameters are when using the /usr/bin/openssl utility.  The only aes encryption example I found was this one ( <a href="http://saju.net.in/blog/?p=36" rel="nofollow">http://saju.net.in/blog/?p=36</a> ), but I haven't been able to get it to produce the same output as /usr/bin/openssl.</p>
  
  <p>Any clues?  Should I look at the source for the openssl utility?</p>
  
  <p>Thanks!</p>