title: Dart - Encrypt message with public key RSA from string format
body: <p>From an api rest built with the Flask framework (Python), I'm getting a <code>public key</code> in the <code>string</code> format.</p>
  
  <p>According to the site <a href="http://studyraspberrypi.blogspot.com/2016/01/sending-rsa-encrypted-message-from.html" rel="nofollow noreferrer">http://studyraspberrypi.blogspot.com/2016/01/sending-rsa-encrypted-message-from.html</a> in python with the <code>Crypto</code> lib is done as follows:</p>
  
  <pre><code>random_generator = Random.new().read
  private_key = RSA.generate(1024, random_generator)
  public_key = private_key.publickey()
  publickey = public_key.exportKey() #public key in string format
  
  #Convert string to key
  server_public_key = RSA.importKey(publickey)
  
  #Encrypt message and send to server
  message = "This is my secret message."
  encrypted = server_public_key.encrypt(message, 32)
  server.sendall("encrypted_message="+str(encrypted))
  </code></pre>
  
  <p>Is it possible in Dart to get the <code>public key</code> in string format and encrypt a message and also send it in the string format?</p>