Add docs and use default value for hasher names.

This commit is contained in:
Matthias Vallentin 2013-07-25 15:16:53 +02:00
parent 5769c32f1e
commit e482897f88

View file

@ -63,7 +63,9 @@ public:
size_t K() const { return k; } size_t K() const { return k; }
/** /**
* Returns the hasher's name. TODO: What's this? * Returns the hasher's name. If not empty, the hasher uses this descriptor
* to seed its *k* hash functions. Otherwise the hasher mixes in the initial
* seed derived from the environment variable `$BRO_SEED`.
*/ */
const std::string& Name() const { return name; } const std::string& Name() const { return name; }
@ -166,7 +168,7 @@ public:
* *
* @param name The name of the hasher. * @param name The name of the hasher.
*/ */
DefaultHasher(size_t k, const std::string& name); DefaultHasher(size_t k, const std::string& name = "");
// Overridden from Hasher. // Overridden from Hasher.
virtual digest_vector Hash(const void* x, size_t n) const /* final */; virtual digest_vector Hash(const void* x, size_t n) const /* final */;
@ -190,7 +192,7 @@ public:
* *
* @param name The name of the hasher. * @param name The name of the hasher.
*/ */
DoubleHasher(size_t k, const std::string& name); DoubleHasher(size_t k, const std::string& name = "");
// Overridden from Hasher. // Overridden from Hasher.
virtual digest_vector Hash(const void* x, size_t n) const /* final */; virtual digest_vector Hash(const void* x, size_t n) const /* final */;