initial commit

Add initial code from phosphor-ipmi-flash/tools that was not specific to
firmware update over ipmi-blobs.

Change-Id: I360537a7392347fe989397a699f6a712bc36e62c
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/src/ipmiblob/crc.hpp b/src/ipmiblob/crc.hpp
new file mode 100644
index 0000000..c335ed2
--- /dev/null
+++ b/src/ipmiblob/crc.hpp
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <cstdint>
+#include <vector>
+
+namespace host_tool
+{
+
+/**
+ * Generate the CRC for a payload (really any bytes).
+ *
+ * This is meant to only be called on the payload and not the CRC or the OEM
+ * header, etc.
+ *
+ * @param[in] data - the bytes against to run the CRC
+ * @return the CRC value
+ */
+std::uint16_t generateCrc(const std::vector<std::uint8_t>& data);
+
+} // namespace host_tool