1#include <vanetza/security/hmac.hpp>
2#include <cryptopp/osrng.h>
3#include <cryptopp/hmac.h>
4#include <cryptopp/sha.h>
11KeyTag create_hmac_tag(
const ByteBuffer& data,
const HmacKey& hmacKey)
16 CryptoPP::HMAC<CryptoPP::SHA256> mac(hmacKey.data(), hmacKey.size());
17 unsigned char tag[hmacKey.size()];
18 mac.Update(data.data(), data.size());
22 std::copy_n(tag, keyTag.size(), keyTag.data());