Vanetza
Loading...
Searching...
No Matches
hmac.hpp
1#pragma once
2#include <vanetza/common/byte_buffer.hpp>
3#include <array>
4#include <cstdint>
5
6namespace vanetza
7{
8namespace security
9{
10
11using HmacKey = std::array<uint8_t, 32>;
12using KeyTag = std::array<uint8_t, 16>;
13
14/**
15 * \brief generate HMAC key and create HMAC tag on data
16 * \param data data to be tagged
17 * \param hmacKey generated HMAC key
18 * \return tag of data generated with hmacKey
19*/
20KeyTag create_hmac_tag(const vanetza::ByteBuffer& data, const HmacKey& hmacKey);
21
22} // namespace security
23} // namespace vanetza