[cpp] Add validating storage.

This patch adds a ValidatingStorage object, which wraps any implementation
of Storage by adding checksum and timestamp when saving data. When reading
data, the object verifies the timestamp freshness and checksum validity.
If these checks fail, then ValidatingStorage behaves as if there's no data
in storage. This behavior would force a Retriever object to re-download
validation rules from the server.

A data timestamp is fresh if it's within a month of the current time.
7 files changed
tree: d6581e93b272cab854d7a222317cecb55cb8eebc
  1. cpp/
  2. externals/
  3. java/
  4. testdata/
  5. .gitmodules