diff options
author | Yao Chen <yaochen@google.com> | 2019-04-21 14:34:30 -0700 |
---|---|---|
committer | Yao Chen <yaochen@google.com> | 2019-04-23 15:20:38 -0700 |
commit | 43706b44705640aec6c3230c25502f6207d01c3d (patch) | |
tree | 70cff4df7ff27b2ac82ca5b2812f838740a39564 /libs/protoutil | |
parent | 7feb1a1f7d0526dc0518be1ee5068ef51a48e074 (diff) |
Add encryption in incidentd.
+ Sections which require encryption will be encryted on disk.
+ When the sections are requested by clients (e.g., permission controller, report assignee),
incidentd will decrypte the data.
+ For efficiency, encryption is done ONLY for sections that require encryption.
+ Use Keystore API for key management.
Bug: 131084614
Test: incidentd_test
Change-Id: I84d6b86807ba5bbde1051e847b2df6e79e6b5be5
Diffstat (limited to 'libs/protoutil')
-rw-r--r-- | libs/protoutil/src/ProtoFileReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libs/protoutil/src/ProtoFileReader.cpp b/libs/protoutil/src/ProtoFileReader.cpp index bbb1fe374f0e..c7f1129fbbaa 100644 --- a/libs/protoutil/src/ProtoFileReader.cpp +++ b/libs/protoutil/src/ProtoFileReader.cpp @@ -99,6 +99,7 @@ ProtoFileReader::next() // Shouldn't get to here. Always call hasNext() before calling next(). return 0; } + mPos++; return mBuffer[mOffset++]; } @@ -130,6 +131,7 @@ ProtoFileReader::move(size_t amt) const size_t chunk = mMaxOffset - mOffset > amt ? amt : mMaxOffset - mOffset; mOffset += chunk; + mPos += chunk; amt -= chunk; } } |