Kea: isc::d2::D2TsigKey Class Reference

| Kea 2.2.0

Public Member Functions | List of all members
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:
[legend]

## 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)
| Constructor. More...
| D2TsigKey (const std::string &key_spec)
| 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
| 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...
TSIGKey & | operator= (const TSIGKey &source)
| Assignment operator. More...
virtual | ~TSIGKey ()
| The destructor. More...
const Name & | getKeyName () const
| Return the key name. More...
const Name & | getAlgorithmName () 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...
std::string | toText () const
| Converts the TSIGKey to a string value. More...

## Additional Inherited Members
Static Public Member Functions inherited from isc::dns::TSIGKey
static const Name & | HMACMD5_NAME ()
| HMAC-MD5 (RFC2845) More...
static const Name & | HMACMD5_SHORT_NAME ()
static const Name & | HMACSHA1_NAME ()
| HMAC-SHA1 (RFC4635) More...
static const Name & | HMACSHA256_NAME ()
| HMAC-SHA256 (RFC4635) More...
static const Name & | HMACSHA224_NAME ()
| HMAC-SHA256 (RFC4635) More...
static const Name & | HMACSHA384_NAME ()
| HMAC-SHA256 (RFC4635) More...
static const Name & | HMACSHA512_NAME ()
| HMAC-SHA256 (RFC4635) More...
static const Name & | GSSTSIG_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_spec | Specification 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_name | The name of the key as a domain name.
  algorithm_name | The hash algorithm used for this key in the form of domain name.
  secret | Point to a binary sequence of the shared secret to be used for this key.
  secret_len | The size of the binary data (`secret`) in bytes.
  digestbits | The 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

Destructor.

Remove the key statistics.

Definition at line 32 of file d2_tsig_key.cc.

## 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

Reset statistics.

Definition at line 57 of file d2_tsig_key.cc.

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

Here is the call graph for this function:

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

- d2_tsig_key.h
- d2_tsig_key.cc