update

Change-Id: Ieca8d47963634a7bb410fc9b7c3860fd438a8fff
diff --git a/src/detail/crypto-helpers.hpp b/src/detail/crypto-helpers.hpp
index 56446e4..801c3a3 100644
--- a/src/detail/crypto-helpers.hpp
+++ b/src/detail/crypto-helpers.hpp
@@ -144,13 +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 counter An opaque counter that must be passed to subsequent invocations of this function
- *                with the same @p key.
+ * @param last 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, uint32_t& counter);
+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);
 
 /**
  * @brief Decode the payload from TLV block with Authenticated GCM 128 Encryption.
@@ -161,11 +163,14 @@
  * @param key The AES key used for encryption.
  * @param associatedData The associated data used for authentication.
  * @param associatedDataSize The size of associated data.
+ * @param decryptionIv The IV observed in the last AES decryption and is needed by subsequent
+ *                     invocations of this function with the same @p key.
  * @return Buffer The plaintext buffer.
  */
 Buffer
 decodeBlockWithAesGcm128(const Block& block, const uint8_t* key,
-                         const uint8_t* associatedData, size_t associatedDataSize);
+                         const uint8_t* associatedData, size_t associatedDataSize,
+                         std::vector<uint8_t>& decryptionIv);
 
 } // namespace ndncert
 } // namespace ndn