fix key length issue

This commit is contained in:
Arvid Norberg 2013-08-19 08:07:54 +00:00
parent 2dc6f50f88
commit 919bc46422
1 changed files with 3 additions and 3 deletions

View File

@ -131,17 +131,17 @@ struct dht_immutable_item
int size;
};
struct rsa_key { char bytes[268]; };
struct ed25519_public_key { char bytes[32]; };
struct dht_mutable_item : dht_immutable_item
{
char sig[64];
int seq;
rsa_key key;
ed25519_public_key key;
};
// 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;
}