forked from premiere/premiere-libtorrent
fix key length issue
This commit is contained in:
parent
2dc6f50f88
commit
919bc46422
|
@ -131,17 +131,17 @@ struct dht_immutable_item
|
||||||
int size;
|
int size;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rsa_key { char bytes[268]; };
|
struct ed25519_public_key { char bytes[32]; };
|
||||||
|
|
||||||
struct dht_mutable_item : dht_immutable_item
|
struct dht_mutable_item : dht_immutable_item
|
||||||
{
|
{
|
||||||
char sig[64];
|
char sig[64];
|
||||||
int seq;
|
int seq;
|
||||||
rsa_key key;
|
ed25519_public_key key;
|
||||||
};
|
};
|
||||||
|
|
||||||
// internal
|
// internal
|
||||||
inline bool operator<(rsa_key const& lhs, rsa_key const& rhs)
|
inline bool operator<(ed25519_public_key const& lhs, ed25519_public_key const& rhs)
|
||||||
{
|
{
|
||||||
return memcmp(lhs.bytes, rhs.bytes, sizeof(lhs.bytes)) < 0;
|
return memcmp(lhs.bytes, rhs.bytes, sizeof(lhs.bytes)) < 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue