dht::key Class Reference

A DHT key. More...

#include <dht/key.h>

Inheritance diagram for dht::key:

dht::store_data dht::basic_data List of all members.

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

Detailed Description

A DHT key.

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.

See also:
value, store_data


Constructor & Destructor Documentation

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

Parameters:
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

Parameters:
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

Parameters:
str string
aht if true a one way hash to the data is allowed


The documentation for this class was generated from the following file:
Generated on Thu Mar 1 16:18:47 2007 for libdht by  doxygen 1.5.1