title: How to hash strings in Python?
body: <p>I have code that outputs all possible combinations of characters from a given character list as follows:</p>
  
  <pre><code>def charList():
      charSet = string.ascii_letters + string.digits
      for wordchars in product(charSet, repeat=8):
          print(''.join(wordchars))
  </code></pre>
  
  <p>Now I need to turn the output strings into a DES hash then compare the output to user input to see if any matches are found. </p>
  
  <p>Have been doing some research and haven't made much progress. So wondering if anyone on here could help?</p>