title: unable to deserialize protobuf bytes field in python
body: <p>I'm passing using protobuf an hashed byte array. but while trying to deserialize it, I'm getting the following error:</p>
  
  <blockquote>
    <p>'utf-8' codec can't decode byte 0xd6 in position 1: 'utf-8' codec
    can't decode byte 0xd6 in position 1: invalid continuation byte in
    field: master.hash1</p>
  </blockquote>
  
  <p>the code is simply:</p>
  
  <pre><code>a = message.ParseFromString(data)
  </code></pre>
  
  <p>I believe it is a simple matter of encoding\decoding, but I have no idea how to do so. </p>
  
  <p>This is the code to encode the data in c#:</p>
  
  <pre><code>public byte[] HmacSign(string key, string message)
  {
      var encoding = new System.Text.ASCIIEncoding();
      byte[] keyByte = encoding.GetBytes(key);
  
      HMACSHA1 hmacsha1 = new HMACSHA1(keyByte);
  
      byte[] messageBytes = encoding.GetBytes(message);
      byte[] hashmessage = hmacsha1.ComputeHash(messageBytes);
  
      return hashmessage;
  }
  </code></pre>