24 #include <util/sha1hash.h>
25 #include <ktorrent_export.h>
57 Key(
const QByteArray & ba);
63 Key(
const bt::Uint8* d);
85 bool operator == (
const Key & other)
const;
92 bool operator != (
const Key & other)
const;
99 bool operator < (
const Key & other)
const;
107 bool operator <= (
const Key & other)
const;
115 bool operator > (
const Key & other)
const;
122 bool operator >= (
const Key & other)
const;
127 Key operator / (
int value)
const;
134 friend KTORRENT_EXPORT
Key operator + (
const Key & a,
const Key & b);
141 friend KTORRENT_EXPORT
Key operator - (
const Key & a,
const Key & b);
148 friend KTORRENT_EXPORT
Key operator + (
const Key & a, bt::Uint8 value);
static Key max()
Get the maximum key (all FF)
static Key min()
Get the minimum key (all zeros)
Key in the distributed hash table.
~Key() override
Destructor.
Key(const bt::SHA1Hash &k)
static Key distance(const Key &a, const Key &b)
Key(const QByteArray &ba)
static Key mid(const Key &a, const Key &b)