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

Additional Inherited Members

- Static Public Member Functions inherited from isc::dns::TSIGKey
static const NameHMACMD5_NAME ()
 HMAC-MD5 (RFC2845) More...
 
static const NameHMACMD5_SHORT_NAME ()
 
static const NameHMACSHA1_NAME ()
 HMAC-SHA1 (RFC4635) More...
 
static const NameHMACSHA256_NAME ()
 HMAC-SHA256 (RFC4635) More...
 
static const NameHMACSHA224_NAME ()
 HMAC-SHA256 (RFC4635) More...
 
static const NameHMACSHA384_NAME ()
 HMAC-SHA256 (RFC4635) More...
 
static const NameHMACSHA512_NAME ()
 HMAC-SHA256 (RFC4635) More...
 
static const NameGSSTSIG_NAME ()
 GSS-TSIG (RFC3645) More...
 

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)
explicit

Constructor.

Initialize the key statistics.

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

Definition at line 22 of file d2_tsig_key.cc.

◆ 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 
)

Constructor.

Initialize the key statistics.

Parameters
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 d2_tsig_key.cc.

◆ ~D2TsigKey()

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

Member Function Documentation

◆ createContext()

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

Create TSIG context.

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

Definition at line 67 of file d2_tsig_key.cc.

◆ resetStats()

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

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