DerivedKeyConfig is comparable

This commit is contained in:
Sebastian Messmer 2015-11-10 19:10:19 -08:00
parent 4cf886c91f
commit 4059c6a9c9

View File

@ -60,6 +60,14 @@ namespace cpputils {
uint32_t _p; uint32_t _p;
}; };
inline bool operator==(const DerivedKeyConfig &lhs, const DerivedKeyConfig &rhs) {
return lhs.salt() == rhs.salt() && lhs.N() == rhs.N() && lhs.r() == rhs.r() && lhs.p() == rhs.p();
}
inline bool operator!=(const DerivedKeyConfig &lhs, const DerivedKeyConfig &rhs) {
return !operator==(lhs, rhs);
}
} }
#endif #endif