code: func MarshalWithSHA256(pm proto.Message) ([]byte, error) {
  	blob, err := proto.Marshal(pm)
  	if err != nil {
  		return nil, err
  	}
  	sum := sha256.Sum256(blob)
  	envelope := messages.BlobWithSHA256{Blob: blob, Sha256: sum[:]}
  	return proto.Marshal(&envelope)
  }
docs: // MarshalWithSHA256 serializes proto message to bytes, calculates SHA256
  // checksum of it, and returns serialized envelope that contains both.
  //
  // UnmarshalWithSHA256 can then be used to verify SHA256 and deserialized the
  // original object.