title: How to generate a mixed-case hash in Python?
body: <p>I am having a hard time figuring out a reasonable way to generate a mixed-case hash in Python.</p>
  
  <p>I want to generate something like: aZeEe9E</p>
  
  <p>Right now I'm using MD5, which doesn't generate case-sensitive hashes.</p>
  
  <p>Do any of you know how to generate a hash value consisting of upper- and lower- case characters + numbers?</p>
  
  <p>-</p>
  
  <p>Okay, GregS's advice worked like a charm (on the first try!):</p>
  
  <p>Here is a simple example:</p>
  
  <pre>
  >>> import hashlib, base64
  >>> s = 'http://gooogle.com'
  >>> hash = hashlib.md5(s).digest()
  >>> print hash
  46c4f333fae34078a68393213bb9272d
  >>> print base64.b64encode(hash)
  NDZjNGYzMzNmYWUzNDA3OGE2ODM5MzIxM2JiOTI3MmQ=
  </pre>