Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Corrupted data and protocol-buffers

I want to know how does protocol buffers handles corrupted data while parsing stream. Is there any way to know if data has been corrupted.

Does protocol buffer provides any inbuilt mechanism for data integrity check?

Thanks,

like image 612
user832096 Avatar asked Oct 01 '22 12:10

user832096


1 Answers

None whatsoever. While some changes might be detected by causing parse failures, a lot of other changes would not be flagged at all. If you are concerned about integrity, add a separate mechanism for this outside of the serialization layer - presumably a checksum / hash.

like image 62
Marc Gravell Avatar answered Oct 04 '22 20:10

Marc Gravell