Poco

template < class Engine >

class HMACEngine

Library: Foundation
Package: Crypt
Header: Poco/HMACEngine.h

Description

This class implements the HMAC message authentication code algorithm, as specified in RFC 2104. The underlying DigestEngine (MD5Engine, SHA1Engine, etc.) must be given as template argument. Since the HMACEngine is a DigestEngine, it can be used with the DigestStream class to create a HMAC for a stream.

Inheritance

Direct Base Classes: DigestEngine

All Base Classes: DigestEngine

Member Summary

Member Functions: digest, digestLength, init, reset, updateImpl

Inherited Functions: constantTimeEquals, digest, digestFromHex, digestLength, digestToHex, reset, update, updateImpl

Enumerations

Anonymous

BLOCK_SIZE = Engine::BLOCK_SIZE

DIGEST_SIZE = Engine::DIGEST_SIZE

Constructors

HMACEngine inline

HMACEngine(
    const std::string & passphrase
);

HMACEngine inline

HMACEngine(
    const char * passphrase,
    std::size_t length
);

Destructor

~HMACEngine virtual inline

~HMACEngine();

Member Functions

digest inline

const DigestEngine::Digest & digest();

digestLength virtual inline

std::size_t digestLength() const;

reset virtual inline

void reset();

init protected inline

void init(
    const char * passphrase,
    std::size_t length
);

updateImpl protected virtual inline

void updateImpl(
    const void * data,
    std::size_t length
);