blob: c335ed2400628e110ecfa3fab6e76c711379cd16 [file] [log] [blame]
Patrick Venture9b750aa2018-12-12 14:26:18 -08001#pragma once
2
3#include <cstdint>
4#include <vector>
5
Patrick Venture9b534f02018-12-13 16:10:02 -08006namespace host_tool
7{
8
Patrick Venture9b750aa2018-12-12 14:26:18 -08009/**
10 * Generate the CRC for a payload (really any bytes).
11 *
12 * This is meant to only be called on the payload and not the CRC or the OEM
13 * header, etc.
14 *
15 * @param[in] data - the bytes against to run the CRC
16 * @return the CRC value
17 */
18std::uint16_t generateCrc(const std::vector<std::uint8_t>& data);
Patrick Venture9b534f02018-12-13 16:10:02 -080019
20} // namespace host_tool