#include <dht/key.h>
Inheritance diagram for dht::key:
Public Member Functions | |
key () | |
default constructor | |
key (const void *data, size_t len, bool aht=true) | |
constructs key from data | |
key (const char *str, bool aht=true) | |
constructs key from C-string | |
key (const std::string &str, bool aht=true) | |
constructs key from string |
Represents a key that is used to index a value in DHT.
By default the DHT is allowed to perform a one way hash to the key data to squeeze it into whatever bit size the DHT supports for keys.
dht::key::key | ( | ) | [inline] |
default constructor
Constructs an empty key.
dht::key::key | ( | const void * | data, | |
size_t | len, | |||
bool | aht = true | |||
) | [inline] |
constructs key from data
data | pointer to data | |
len | data length | |
aht | if true a one way hash to the data is allowed |
dht::key::key | ( | const char * | str, | |
bool | aht = true | |||
) | [inline] |
constructs key from C-string
str | NULL terminated string | |
aht | if true a one way hash to the data is allowed |
dht::key::key | ( | const std::string & | str, | |
bool | aht = true | |||
) | [inline] |
constructs key from string
str | string | |
aht | if true a one way hash to the data is allowed |