title: What is the best way to encrypt stored data in web2py?
body: <p>I need to encrypt data stored in web2py, more precisely passwords.</p>
  
  <p>This is not about authentication, but more something in the line of a KeePass-like application.</p>
  
  <p>I've seen that is included in web2py, but and <a href="http://www.heikkitoivonen.net/m2secret/" rel="nofollow">M2Secret</a> could easily do that. With M2Secret I can use this:</p>
  
  <pre>
  import m2secret
  
  # Encrypt
  secret = m2secret.Secret()
  secret.encrypt('my data', 'my master password')
  serialized = secret.serialize()
  
  # Decrypt
  secret = m2secret.Secret()
  secret.deserialize(serialized)
  data = secret.decrypt('my master password')
  </pre>
  
  <p>But I would have to include the M2Crypto library in my appliance.</p>
  
  <p>Is there a way to do this with PyMe which is already included with web2py?</p>