title: Encrypt a string using OpenSSL in C
body: <p>I have a problem with encrypting a string.
  I have the command to encrypt a file using OpenSSL.
  But I wanted to know the encrypt the string not the File.
  The command for encrypting a file is:</p>
  
  <pre><code>system("openssl des3 -e -nosalt -in %s -out  %s -k %s &gt; /tmp/sys; cat /tmp/sys", src, dest, key);
  </code></pre>
  
  <p>where src and dest are the two file names.
  what are the options available with OPEN SSL.
  In above in and out are options for encrypting a text file.
  I need the option to encrypting character array variable.</p>