CMSDK 2.0.1
Cross-platform C++ base library and SDK for the Psyclone AIOS platform
Loading...
Searching...
No Matches
hmac.h File Reference

Third-party (vendored): RFC 2104 HMAC template from Stephan Brumme's portable hashing library (create.stephan-brumme.com). More...

#include <string>
#include <cstring>
Include dependency graph for hmac.h:

Go to the source code of this file.

Namespaces

namespace  hash
 Usage: std::string msg = "The quick brown fox jumps over the lazy dog"; std::string key = "key"; std::string md5hmac = hmac< MD5 >(msg, key); std::string sha1hmac = hmac< SHA1 >(msg, key); std::string sha2hmac = hmac<SHA256>(msg, key);.

Functions

template<typename HashMethod>
std::string hash::hmac (const void *data, size_t numDataBytes, const void *key, size_t numKeyBytes)
 compute HMAC hash of data and key using MD5, SHA1 or SHA256
template<typename HashMethod>
std::string hash::hmac (const std::string &data, const std::string &key)
 convenience function for std::string

Detailed Description

Third-party (vendored): RFC 2104 HMAC template from Stephan Brumme's portable hashing library (create.stephan-brumme.com).

Kept close to upstream; not part of the CMSDK documentation remediation - see the file's own copyright notice below.

Definition in file hmac.h.