libptpmgmt  1.4
libptpmgmt library that provides the functionality of linuxptp pmc
Classes | Public Member Functions | List of all members
Spp Class Reference

authentication security parameters More...

#include <cfg.h>

Public Member Functions

bool addKey (uint32_t id, HMAC_t type, Binary &value, size_t digest, bool replace=true)
 
bool have (uint32_t key) const
 
size_t mac_size (uint32_t key) const
 
const Binarykey (uint32_t key) const
 
size_t keys () const
 
HMAC_t htype (uint32_t key) const
 
uint8_t ownID () const
 
 Spp (uint8_t id)
 

Detailed Description

authentication security parameters

Pool of authentication keys, used by the Massage class to calculate the Integrity Check Value (ICV) in the authentication TLV.

Constructor & Destructor Documentation

◆ Spp()

Spp::Spp ( uint8_t  id)
inline

Construct empty SPP

Parameters
[in]idof SPP

Member Function Documentation

◆ addKey()

bool Spp::addKey ( uint32_t  id,
HMAC_t  type,
Binary value,
size_t  digest,
bool  replace = true 
)

Set a new key

Parameters
[in]idid the Key
[in]typeof the key
[in]valueof the key
[in]digestsize to use with the key
[in]replacean existing key if exist
Returns
true, if new key is valid

◆ have()

bool Spp::have ( uint32_t  key) const
inline

Verify key exist

Parameters
[in]keyID
Returns
true if key exist

◆ htype()

HMAC_t Spp::htype ( uint32_t  key) const

Get key type

Parameters
[in]keyID
Returns
Key type

◆ key()

const Binary& Spp::key ( uint32_t  key) const

Get key

Parameters
[in]keyID
Returns
Key or empty binary if key does not exist

◆ keys()

size_t Spp::keys ( ) const
inline

Get number of keys

Returns
Key or empty binary if key does not exist

◆ mac_size()

size_t Spp::mac_size ( uint32_t  key) const

Get MAC digest size to use with the key

Parameters
[in]keyID
Returns
MAC digest size or 0 if the key does not exist

◆ ownID()

uint8_t Spp::ownID ( ) const
inline

Return own SPP ID

Returns
own SPP ID

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