I want to parse sensitive data with JsonCpp and am interested in wiping the parsed data in memory after its use. I am willing to develop a patch for it myself. If I submit such a patch, will it be merged?
If yes, is there any suggestion on how to implement such wiping?
I can think of several ways to implement wiping:
-
As I am interested, first of all, in wiping strings, I can introduce a type Json::string and use it everywhere in the library (except APIs, of course) instead of std::string. By default, Json::string will be typedefed to just std::string. If some #define is active, Json::string will be a type derived from std::string that will wipe all the string characters in the destructor.
-
I can introduce some wiping allocator and supply it to every std::string and another std:: container object being created. It seems like a more generic approach, but then it's easy to forget to supply an allocator when writing new code. And the patch will be quite large in this case.
-
Your way, dear library developers?
I want to parse sensitive data with JsonCpp and am interested in wiping the parsed data in memory after its use. I am willing to develop a patch for it myself. If I submit such a patch, will it be merged?
If yes, is there any suggestion on how to implement such wiping?
I can think of several ways to implement wiping:
As I am interested, first of all, in wiping strings, I can introduce a type Json::string and use it everywhere in the library (except APIs, of course) instead of std::string. By default, Json::string will be typedefed to just std::string. If some #define is active, Json::string will be a type derived from std::string that will wipe all the string characters in the destructor.
I can introduce some wiping allocator and supply it to every std::string and another std:: container object being created. It seems like a more generic approach, but then it's easy to forget to supply an allocator when writing new code. And the patch will be quite large in this case.
Your way, dear library developers?