Kea
1.9.9-git
|
Factory class of NSEC3Hash. More...
#include <nsec3hash.h>
Public Member Functions | |
virtual | ~NSEC3HashCreator () |
The destructor. More... | |
virtual NSEC3Hash * | create (const rdata::generic::NSEC3PARAM &nsec3param) const =0 |
Factory method of NSECHash from NSEC3PARAM RDATA. More... | |
virtual NSEC3Hash * | create (const rdata::generic::NSEC3 &nsec3) const =0 |
Factory method of NSECHash from NSEC3 RDATA. More... | |
virtual NSEC3Hash * | create (uint8_t algorithm, uint16_t iterations, const uint8_t *salt_data, size_t salt_length) const =0 |
Factory method of NSECHash from args. More... | |
Protected Member Functions | |
NSEC3HashCreator () | |
The default constructor. More... | |
Factory class of NSEC3Hash.
This class is an abstract base class that provides the creation interfaces of NSEC3Hash
objects. By defining a specific derived class of the creator, normally with a different specific class of NSEC3Hash
, the application can use a customized implementation of NSEC3Hash
without changing the library itself. The intended primary application of such customization is tests (it would be convenient for a test to produce a faked hash value regardless of the input so it doesn't have to identify a specific input value to produce a particular hash). Another possibility would be an experimental extension for a newer hash algorithm or implementation.
The three main methods named create()
correspond to the static factory methods of NSEC3Hash
of the same name.
By default, the library uses the DefaultNSEC3HashCreator
creator. The setNSEC3HashCreator()
function can be used to replace it with a user defined version. For such customization purposes as implementing experimental new hash algorithms, the application may internally want to use the DefaultNSEC3HashCreator
in general cases while creating a customized type of NSEC3Hash
object for that particular hash algorithm.
The creator objects are generally expected to be stateless; they will only encapsulate the factory logic. The create()
methods are declared as const member functions for this reason. But if we see the need for having a customized creator that benefits from its own state in future, this condition can be loosened.
Definition at line 203 of file nsec3hash.h.
|
inlineprotected |
The default constructor.
Make very sure this isn't directly instantiated by making it protected even if this class is modified to lose all pure virtual methods.
Definition at line 209 of file nsec3hash.h.
|
inlinevirtual |
The destructor.
This does nothing; defined only for allowing derived classes to specialize its behavior.
Definition at line 216 of file nsec3hash.h.
|
pure virtual |
Factory method of NSECHash from NSEC3PARAM RDATA.
See NSEC3Hash::create(const rdata::generic::NSEC3PARAM& param)
Implemented in isc::dns::DefaultNSEC3HashCreator.
|
pure virtual |
Factory method of NSECHash from NSEC3 RDATA.
See NSEC3Hash::create(const rdata::generic::NSEC3& param)
Implemented in isc::dns::DefaultNSEC3HashCreator.
|
pure virtual |
Factory method of NSECHash from args.
See NSEC3Hash::create(uint8_t algorithm, uint16_t iterations, const uint8_t* salt_data, size_t salt_length)
algorithm | the NSEC3 algorithm to use; currently only 1 (SHA-1) is supported |
iterations | the number of iterations |
salt_data | the salt data as a byte array |
salt_length | the length of the salt data |
Implemented in isc::dns::DefaultNSEC3HashCreator.