finish iv

Change-Id: I8fc42d1fabbd21ae4f699d7b1c31e9218fec9f9e
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index b3b1ade..2623a10 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -420,8 +420,8 @@
     // TODO: where is renew?
   }
   else {
-    m_storage->updateRequest(*requestState);
     payload = challengetlv::encodeDataContent(*requestState);
+    m_storage->updateRequest(*requestState);
     NDN_LOG_TRACE("No failure no success. Challenge moves on");
   }
 
diff --git a/src/detail/crypto-helpers.cpp b/src/detail/crypto-helpers.cpp
index 469a967..56a4eaa 100644
--- a/src/detail/crypto-helpers.cpp
+++ b/src/detail/crypto-helpers.cpp
@@ -341,8 +341,10 @@
 }
 
 Block
-encodeBlockWithAesGcm128(uint32_t tlvType, const uint8_t* key, const uint8_t* payload, size_t payloadSize,
-                         const uint8_t* associatedData, size_t associatedDataSize, std::vector<uint8_t>& encryptionIv)
+encodeBlockWithAesGcm128(uint32_t tlvType, const uint8_t* key,
+                         const uint8_t* payload, size_t payloadSize,
+                         const uint8_t* associatedData, size_t associatedDataSize,
+                         std::vector<uint8_t>& encryptionIv)
 {
   // The spec of AES encrypted payload TLV used in NDNCERT:
   //   https://github.com/named-data/ndncert/wiki/NDNCERT-Protocol-0.3#242-aes-gcm-encryption
diff --git a/src/detail/crypto-helpers.hpp b/src/detail/crypto-helpers.hpp
index 801c3a3..e6d2483 100644
--- a/src/detail/crypto-helpers.hpp
+++ b/src/detail/crypto-helpers.hpp
@@ -144,15 +144,15 @@
  * @param payloadSize The size of the plaintext payload.
  * @param associatedData The associated data used for authentication.
  * @param associatedDataSize The size of associated data.
- * @param last The IV used by the last AES encryption and is needed by subsequent invocations of this function
- *             with the same @p key.
+ * @param encryptionIv The IV used by the last AES encryption and is needed by subsequent invocations of this function
+ *                     with the same @p key.
  * @return Block The TLV block with @p tlv_type TLV TYPE.
  */
 Block
 encodeBlockWithAesGcm128(uint32_t tlvType, const uint8_t* key,
                          const uint8_t* payload, size_t payloadSize,
                          const uint8_t* associatedData, size_t associatedDataSize,
-                         std::vector<uint8_t>& lastIv);
+                         std::vector<uint8_t>& encryptionIv);
 
 /**
  * @brief Decode the payload from TLV block with Authenticated GCM 128 Encryption.
diff --git a/tests/unit-tests/bench.t.cpp b/tests/unit-tests/bench.t.cpp
index 44e5ac5..54fc7d7 100644
--- a/tests/unit-tests/bench.t.cpp
+++ b/tests/unit-tests/bench.t.cpp
@@ -24,6 +24,8 @@
 #include "requester.hpp"
 #include "test-common.hpp"
 
+#include <iostream>
+
 namespace ndn {
 namespace ndncert {
 namespace tests {