diff --git a/flash-ipmi.cpp b/flash-ipmi.cpp
index ab294c3..35f8ad2 100644
--- a/flash-ipmi.cpp
+++ b/flash-ipmi.cpp
@@ -61,3 +61,9 @@
     /* TODO: implement. */
     return false;
 }
+
+bool FlashUpdate::hashFinish()
+{
+    /* TODO: implement. */
+    return false;
+}
diff --git a/flash-ipmi.hpp b/flash-ipmi.hpp
index ddcfa14..baf4c7f 100644
--- a/flash-ipmi.hpp
+++ b/flash-ipmi.hpp
@@ -124,6 +124,11 @@
      */
     virtual bool hashData(uint32_t offset,
                           const std::vector<uint8_t>& bytes) = 0;
+
+    /**
+     * Called to indicate the host is done sending the hash bytes.
+     */
+    virtual bool hashFinish() = 0;
 };
 
 class FlashUpdate : public UpdateInterface
@@ -142,6 +147,7 @@
 
     bool startHash(uint32_t length) override;
     bool hashData(uint32_t offset, const std::vector<uint8_t>& bytes) override;
+    bool hashFinish() override;
 
   private:
     /**
diff --git a/ipmi.cpp b/ipmi.cpp
index 50208d3..b9a8943 100644
--- a/ipmi.cpp
+++ b/ipmi.cpp
@@ -142,3 +142,17 @@
     (*dataLen) = 1;
     return IPMI_CC_OK;
 }
+
+ipmi_ret_t hashFinish(UpdateInterface* updater, const uint8_t* reqBuf,
+                      uint8_t* replyBuf, size_t* dataLen)
+{
+    if (!updater->hashFinish())
+    {
+        return IPMI_CC_INVALID;
+    }
+
+    /* We were successful and set the response byte to 0. */
+    replyBuf[0] = 0x00;
+    (*dataLen) = 1;
+    return IPMI_CC_OK;
+}
diff --git a/ipmi.hpp b/ipmi.hpp
index 1010b6f..5401108 100644
--- a/ipmi.hpp
+++ b/ipmi.hpp
@@ -77,3 +77,16 @@
  */
 ipmi_ret_t hashBlock(UpdateInterface* updater, const uint8_t* reqBuf,
                      uint8_t* replyBuf, size_t* dataLen);
+
+/**
+ * Indicate all hash data has been sent.
+ *
+ * @param[in] updater - Pointer to Updater object.
+ * @param[in] reqBuf - the IPMI packet.
+ * @param[in] replyBuf - Pointer to buffer for any response.
+ * @param[in,out] dataLen - Initially reqBuf length, set to replyBuf
+ * length when done.
+ * @return corresponding IPMI return code.
+ */
+ipmi_ret_t hashFinish(UpdateInterface* updater, const uint8_t* reqBuf,
+                      uint8_t* replyBuf, size_t* dataLen);
diff --git a/main.cpp b/main.cpp
index cb86fcd..4d2e4bf 100644
--- a/main.cpp
+++ b/main.cpp
@@ -72,6 +72,9 @@
         case FlashSubCmds::flashHashData:
             return hashBlock(flashUpdateSingleton.get(), reqBuf, replyCmdBuf,
                              dataLen);
+        case FlashSubCmds::flashHashFinish:
+            return hashFinish(flashUpdateSingleton.get(), reqBuf, replyCmdBuf,
+                              dataLen);
         default:
             return IPMI_CC_INVALID;
     }
diff --git a/test/Makefile.am b/test/Makefile.am
index 392db5c..350c3a8 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -15,6 +15,7 @@
 	ipmi_flashfinish_unittest \
 	ipmi_starthash_unittest \
 	ipmi_hashdata_unittest \
+	ipmi_hashfinish_unittest \
 	ipmi_validate_unittest
 
 TESTS = $(check_PROGRAMS)
@@ -34,5 +35,8 @@
 ipmi_hashdata_unittest_SOURCES = ipmi_hashdata_unittest.cpp
 ipmi_hashdata_unittest_LDADD = $(top_builddir)/ipmi.o
 
+ipmi_hashfinish_unittest_SOURCES = ipmi_hashfinish_unittest.cpp
+ipmi_hashfinish_unittest_LDADD = $(top_builddir)/ipmi.o
+
 ipmi_validate_unittest_SOURCES = ipmi_validate_unittest.cpp
 ipmi_validate_unittest_LDADD = $(top_builddir)/ipmi.o
diff --git a/test/ipmi_hashfinish_unittest.cpp b/test/ipmi_hashfinish_unittest.cpp
new file mode 100644
index 0000000..006525d
--- /dev/null
+++ b/test/ipmi_hashfinish_unittest.cpp
@@ -0,0 +1,34 @@
+#include "flash-ipmi.hpp"
+#include "ipmi.hpp"
+
+#include "updater_mock.hpp"
+
+#include <cstring>
+#include <gtest/gtest.h>
+
+using ::testing::Return;
+using ::testing::StrictMock;
+
+// ipmid.hpp isn't installed where we can grab it and this value is per BMC
+// SoC.
+#define MAX_IPMI_BUFFER 64
+
+TEST(IpmiHashFinish, CallPassedOn)
+{
+    // The data finish command does no validation as the input is empty, and
+    // simply relies on the flash manager to do work.
+
+    StrictMock<UpdaterMock> updater;
+
+    size_t dataLen;
+    uint8_t request[MAX_IPMI_BUFFER] = {0};
+    uint8_t reply[MAX_IPMI_BUFFER] = {0};
+
+    dataLen = 1; // request is only the command.
+    request[0] = FlashSubCmds::flashHashFinish;
+
+    EXPECT_CALL(updater, hashFinish()).WillOnce(Return(true));
+    EXPECT_EQ(IPMI_CC_OK, hashFinish(&updater, request, reply, &dataLen));
+    EXPECT_EQ(sizeof(uint8_t), dataLen);
+    EXPECT_EQ(0, reply[0]);
+}
diff --git a/test/updater_mock.hpp b/test/updater_mock.hpp
index 1e03a31..fa912ea 100644
--- a/test/updater_mock.hpp
+++ b/test/updater_mock.hpp
@@ -15,4 +15,5 @@
     MOCK_METHOD0(flashFinish, bool());
     MOCK_METHOD1(startHash, bool(uint32_t));
     MOCK_METHOD2(hashData, bool(uint32_t, const std::vector<uint8_t>&));
+    MOCK_METHOD0(hashFinish, bool());
 };
