Skip to content

Wiping data after use #152

Closed
Closed
@alexeikh-promon

Description

@alexeikh-promon

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:

  1. 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.

  2. 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.

  3. Your way, dear library developers?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions