crypto: make ec_point comparable
This commit is contained in:
@@ -371,6 +371,7 @@ inline const unsigned char* to_bytes(const crypto::ec_scalar &scalar) { return &
|
||||
inline unsigned char* to_bytes(crypto::ec_point &point) { return &reinterpret_cast<unsigned char&>(point); }
|
||||
inline const unsigned char* to_bytes(const crypto::ec_point &point) { return &reinterpret_cast<const unsigned char&>(point); }
|
||||
|
||||
CRYPTO_MAKE_HASHABLE(ec_point)
|
||||
CRYPTO_MAKE_HASHABLE(public_key)
|
||||
CRYPTO_MAKE_HASHABLE_CONSTANT_TIME(secret_key)
|
||||
CRYPTO_MAKE_HASHABLE_CONSTANT_TIME(public_key_memsafe)
|
||||
|
||||
@@ -49,10 +49,6 @@ bool operator !=(const ec_scalar &a, const ec_scalar &b) {
|
||||
return 0 != memcmp(&a, &b, sizeof(ec_scalar));
|
||||
}
|
||||
|
||||
bool operator !=(const ec_point &a, const ec_point &b) {
|
||||
return 0 != memcmp(&a, &b, sizeof(ec_point));
|
||||
}
|
||||
|
||||
bool operator !=(const key_derivation &a, const key_derivation &b) {
|
||||
return 0 != memcmp(&a, &b, sizeof(key_derivation));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user