Kea 2.7.0
isc::d2::D2TsigKey Class Reference

Statistics keeping extension of the DNS TSIGKey class. More...

#include <d2_tsig_key.h>

+ Inheritance diagram for isc::d2::D2TsigKey:

Public Member Functions

 D2TsigKey (const dns::Name &key_name, const dns::Name &algorithm_name, const void *secret, size_t secret_len, size_t digestbits=0)
 D2TsigKey (const std::string &key_spec)
virtual ~D2TsigKey ()
virtual dns::TSIGContextPtr createContext ()
 Create TSIG context.
virtual void resetStats ()
 Reset statistics.
- Public Member Functions inherited from isc::dns::TSIGKey
 TSIGKey (const Name &key_name, const Name &algorithm_name, const void *secret, size_t secret_len, size_t digestbits=0)
 Constructors, Assignment Operator and Destructor.
 TSIGKey (const std::string &str)
 Constructor from an input string.
 TSIGKey (const TSIGKey &source)
 The copy constructor.
virtual ~TSIGKey ()
 The destructor.
isc::cryptolink::HashAlgorithm getAlgorithm () const
 Return the hash algorithm name in the form of cryptolink::HashAlgorithm.
const NamegetAlgorithmName () const
 Return the algorithm name.
size_t getDigestbits () const
 Return the minimum truncated length.
const NamegetKeyName () const
 Getter Methods.
const void * getSecret () const
 Return the value of the TSIG secret.
size_t getSecretLength () const
 Return the length of the TSIG secret in bytes.
TSIGKeyoperator= (const TSIGKey &source)
 Assignment operator.
std::string toText () const
 Converts the TSIGKey to a string value.

Additional Inherited Members

- Static Public Member Functions inherited from isc::dns::TSIGKey
static const NameGSSTSIG_NAME ()
static const NameHMACMD5_NAME ()
 Well known algorithm names as defined in RFC2845 and RFC4635.
static const NameHMACMD5_SHORT_NAME ()
static const NameHMACSHA1_NAME ()
static const NameHMACSHA224_NAME ()
static const NameHMACSHA256_NAME ()
static const NameHMACSHA384_NAME ()
static const NameHMACSHA512_NAME ()

Detailed Description

Statistics keeping extension of the DNS TSIGKey class.

Implements a TSIGKey derived class which can be used as the value of TSIGKeyPtr so with minimal or no update to the DNS++ library.

Definition at line 21 of file d2_tsig_key.h.

Constructor & Destructor Documentation

◆ D2TsigKey() [1/2]

isc::d2::D2TsigKey::D2TsigKey ( const std::string & key_spec)


Initialize the key statistics.

key_specSpecification of the key (name:secret[:algorithm][:digestbits])

Definition at line 22 of file

◆ D2TsigKey() [2/2]

isc::d2::D2TsigKey::D2TsigKey ( const dns::Name & key_name,
const dns::Name & algorithm_name,
const void * secret,
size_t secret_len,
size_t digestbits = 0 )


Initialize the key statistics.

key_nameThe name of the key as a domain name.
algorithm_nameThe hash algorithm used for this key in the form of domain name.
secretPoint to a binary sequence of the shared secret to be used for this key.
secret_lenThe size of the binary data (secret) in bytes.
digestbitsThe number of bits to include in the digest (0 means to include all)

Definition at line 26 of file

◆ ~D2TsigKey()

isc::d2::D2TsigKey::~D2TsigKey ( )


Remove the key statistics.

Definition at line 32 of file

Member Function Documentation

◆ createContext()

TSIGContextPtr isc::d2::D2TsigKey::createContext ( )

Create TSIG context.

Derived classes can implement their own specific context.
The specific dns::TSIGContext of the dns::TSIGKey.

Definition at line 67 of file

◆ resetStats()

void isc::d2::D2TsigKey::resetStats ( )

Reset statistics.

Definition at line 57 of file

References isc::stats::StatsMgr::generateName(), isc::dns::TSIGKey::getKeyName(), isc::stats::StatsMgr::instance(), and isc::d2::D2Stats::key.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: