title: App Engine ndb StringProperty and string hashes
body: <p>I'm using PyCrypto for generating secure key hashes. I want to store one or more of the partial keys I generate. Each partial key is in the form</p>
  
  <pre><code>\x0f|4\xcc\x02b\xc3\xf8\xb0\xd8\xfc\xd4\x90VE\xf2
  </code></pre>
  
  <p>I have an ndb <code>StringProperty()</code> in which I'd lke to store that info. However, it raises a <code>BadValueError</code> saying it expects an UTF-8 encoded string. I tried using str's <code>.encode('uft-8')</code> method but that also raises an error telling me it couldn't encode because bad positioning. </p>
  
  <p>Anyway, my question is, how can I convert that byte string into something I can store in ndb?</p>