title: hash function that outputs integer from 0 to 255?
body: <p>I need a very simple hash function in Python that will convert a string to an integer from 0 to 255.</p>
  
  <p>For example:</p>
  
  <pre><code>&gt;&gt;&gt; hash_function("abc_123")
  32
  &gt;&gt;&gt; hash_function("any-string-value")
  99
  </code></pre>
  
  <p>It does not matter what the integer is as long as I get the same integer every time I call the function.</p>
  
  <p>I want to use the integer to generate a random subnet mask based on the name of the network.</p>