CppCMS
Public Member Functions | List of all members
cppcms::crypto::hmac Class Reference

This object calculates the HMAC signature for the input data. More...

#include <cppcms/crypto.h>

Inheritance diagram for cppcms::crypto::hmac:
booster::noncopyable

Public Member Functions

 hmac (std::auto_ptr< message_digest > digest, key const &k)
 
 hmac (std::string const &name, key const &k)
 
unsigned digest_size () const
 
void append (void const *ptr, size_t size)
 
void readout (void *ptr)
 

Detailed Description

This object calculates the HMAC signature for the input data.

Constructor & Destructor Documentation

cppcms::crypto::hmac::hmac ( std::auto_ptr< message_digest digest,
key const &  k 
)

Create hmac that uses given digest algorithm and a binary key - key

cppcms::crypto::hmac::hmac ( std::string const &  name,
key const &  k 
)

Create hmac that uses message digest algorithm called name and use a binary key - key

Member Function Documentation

void cppcms::crypto::hmac::append ( void const *  ptr,
size_t  size 
)

Add data for signing

unsigned cppcms::crypto::hmac::digest_size ( ) const

Get the size of the signtature

void cppcms::crypto::hmac::readout ( void *  ptr)

Get the signature for all the data, after calling this function the state of the hmac is reset and it can be used for signing again

Note: provided buffer must be digest_size() bytes long.


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