[protobuf] Using of protobufs for security sensitive data (c++)

2014-06-12 Thread vstakhov
Hello, Since protobuf library uses std::string for bytes fields, I'm wondering whether it is possible to securely clear the memory that contains sensitive data (e.g. secret keys)? At the moment, I use the following code just before protobuf object destruction: for (volatile auto c :

[protobuf] DynamicMessage and unknown fields

2014-06-12 Thread Sean Chen
Hi, I have some code set up like this: const Descriptor* msg_desc = pool-FindMessageTypeByName(class_name); DynamicMessageFactory dmf; Message* dm = dmf.GetPrototype(msg_desc)-New(); string str(serialized, length); bool success = dm-ParseFromString(str); ... which outputs the DebugString:

[protobuf] Re: DynamicMessage and unknown fields

2014-06-12 Thread Sean Chen
I forgot to add that I'm using Protobuf 2.4.0 for C++. On Thursday, June 12, 2014 9:34:22 AM UTC-7, Sean Chen wrote: Hi, I have some code set up like this: const Descriptor* msg_desc = pool-FindMessageTypeByName(class_name); DynamicMessageFactory dmf; Message* dm =

[protobuf] Re: DynamicMessage and unknown fields

2014-06-12 Thread Sean Chen
After a nice energizing lunch, I found out that I was parsing it into the wrong type... On Thursday, June 12, 2014 10:46:50 AM UTC-7, Sean Chen wrote: I forgot to add that I'm using Protobuf 2.4.0 for C++. On Thursday, June 12, 2014 9:34:22 AM UTC-7, Sean Chen wrote: Hi, I have some code