title: OpenSSL RSA Example
body: <p>I have to use Crypto (OpenSSL) in my C# project, I could use all the symmetric ciphers and the message digests but i could'n use the RSA. Please, does any one know how to use it ? 
  I mean how to manipulate the private/ public key automatically or manually (with big integers).</p>
  
  <p><strong>EDIT</strong>  </p>
  
  <pre><code>byte[] msg = System.Text.Encoding.ASCII.GetBytes("text to encrypt");
  OpenSSL.Crypto.RSA rsa = new OpenSSL.Crypto.RSA();
  byte[]result = rsa.PrivateEncrypt(msg, OpenSSL.Crypto.RSA.Padding.None);
  Console.WriteLine(Convert.ToBase64String(result));
  </code></pre>
  
  <p>I got AccessViolationException with this message : "Attempted to read or write protected memory. This is often an indication that other memory is corrupt."</p>
  
  <p>and I thing something is missing, to configure RSA keys no?</p>