mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Add SecretKey comparison operator (RIPD-1382)
This commit is contained in:
@@ -68,6 +68,24 @@ public:
|
||||
to_string() const;
|
||||
};
|
||||
|
||||
inline
|
||||
bool
|
||||
operator== (SecretKey const& lhs,
|
||||
SecretKey const& rhs)
|
||||
{
|
||||
return lhs.size() == rhs.size() &&
|
||||
std::memcmp(lhs.data(),
|
||||
rhs.data(), rhs.size()) == 0;
|
||||
}
|
||||
|
||||
inline
|
||||
bool
|
||||
operator!= (SecretKey const& lhs,
|
||||
SecretKey const& rhs)
|
||||
{
|
||||
return ! (lhs == rhs);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Produces a sequence of secp256k1 key pairs. */
|
||||
|
||||
Reference in New Issue
Block a user