Make FileEncryptionKey fields private.
GitOrigin-RevId: 06ec5e24b9154e1830fd3d37b833df60609c675a
This commit is contained in:
parent
0d375251a4
commit
a0fa744735
@ -86,14 +86,15 @@ struct FileEncryptionKey {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
friend bool operator==(const FileEncryptionKey &lhs, const FileEncryptionKey &rhs) {
|
||||||
|
return lhs.key_iv_ == rhs.key_iv_;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
string key_iv_; // TODO wrong alignment is possible
|
string key_iv_; // TODO wrong alignment is possible
|
||||||
Type type_ = Type::None;
|
Type type_ = Type::None;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool operator==(const FileEncryptionKey &lhs, const FileEncryptionKey &rhs) {
|
|
||||||
return lhs.key_iv_ == rhs.key_iv_;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool operator!=(const FileEncryptionKey &lhs, const FileEncryptionKey &rhs) {
|
inline bool operator!=(const FileEncryptionKey &lhs, const FileEncryptionKey &rhs) {
|
||||||
return !(lhs == rhs);
|
return !(lhs == rhs);
|
||||||
}
|
}
|
||||||
|
@ -1278,7 +1278,7 @@ static int merge_choose_encryption_key(const FileEncryptionKey &a, const FileEnc
|
|||||||
if (a.empty() != b.empty()) {
|
if (a.empty() != b.empty()) {
|
||||||
return a.empty() > b.empty();
|
return a.empty() > b.empty();
|
||||||
}
|
}
|
||||||
if (a.key_iv_ != b.key_iv_) {
|
if (a != b) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
return 2;
|
return 2;
|
||||||
|
Reference in New Issue
Block a user