title: Simple way to encode a string according to a password?
body: <p>Does Python have a built-in, simple way of encoding/decoding strings using a password?</p>
  
  <p>Something like this:</p>
  
  <pre><code>&gt;&gt;&gt; encode('John Doe', password = 'mypass')
  'sjkl28cn2sx0'
  &gt;&gt;&gt; decode('sjkl28cn2sx0', password = 'mypass')
  'John Doe'
  </code></pre>
  
  <p>So the string "John Doe" gets encrypted as 'sjkl28cn2sx0'. To get the original string, I would "unlock" that string with the key 'mypass', which is a password in my source code. I'd like this to be the way I can encrypt/decrypt a Word document with a password.</p>
  
  <p>I would like to use these encrypted strings as URL parameters. My goal is obfuscation, not strong security; nothing mission critical is being encoded. I realize I could use a database table to store keys and values, but am trying to be minimalist.</p>