libhomegear-base  0.7
Base library for Homegear and Homegear family modules.
BaseLib::Security::Mac Class Reference

#include <Mac.h>

Public Member Functions

virtual ~Mac ()
 Destructor. More...
 

Static Public Member Functions

template<typename Data >
static bool cmac (const Data &key, const Data &iv, const Data &in, Data &out)
 Calculates the CMAC of the passed binary data. More...
 

Protected Member Functions

 Mac ()
 Constructor. More...
 

Constructor & Destructor Documentation

§ ~Mac()

virtual BaseLib::Security::Mac::~Mac ( )
virtual

Destructor.

Does nothing.

§ Mac()

BaseLib::Security::Mac::Mac ( )
protected

Constructor.

It is protected, because the class only contains static methods. It does nothing.

Member Function Documentation

§ cmac()

template<typename Data >
bool BaseLib::Security::Mac::cmac ( const Data &  key,
const Data &  iv,
const Data &  in,
Data &  out 
)
static

Calculates the CMAC of the passed binary data.

Parameters
[in]keyThe AES key to use for CMAC calculation.
[in]ivThe AES IV to use for CMAC calculation. Can be an empty array.
[in]inThe data to calculate the CMAC for.
[out]outA vector to store the calculated MAC in.
Returns
Returns "true" on success and "false" on error.
Exceptions
GcryptExceptionOn errors.

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