change RequestID to RequestId

Change-Id: Icb426614f391d2828c906155a0d37fd7da7c13f8
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index 7153731..2aee91a 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -305,7 +305,7 @@
                                        "Error computing the request ID."));
     return;
   }
-  RequestID id;
+  RequestId id;
   std::memcpy(id.data(), requestIdData, id.size());
   RequestState requestState(m_config.m_caItem.m_caPrefix, id,
                        requestType, Status::BEFORE_CHALLENGE, *clientCert,
@@ -464,7 +464,7 @@
 std::unique_ptr<RequestState>
 CaModule::getCertificateRequest(const Interest& request)
 {
-  RequestID requestId;
+  RequestId requestId;
   try {
     auto& component = request.getName().at(m_config.m_caItem.m_caPrefix.size() + 2);
     std::memcpy(requestId.data(), component.value(), component.value_size());
diff --git a/src/detail/ca-memory.cpp b/src/detail/ca-memory.cpp
index a293a18..f2a3b12 100644
--- a/src/detail/ca-memory.cpp
+++ b/src/detail/ca-memory.cpp
@@ -36,7 +36,7 @@
 }
 
 RequestState
-CaMemory::getRequest(const RequestID& requestId)
+CaMemory::getRequest(const RequestId& requestId)
 {
   auto search = m_requests.find(requestId);
   if (search == m_requests.end()) {
@@ -70,7 +70,7 @@
 }
 
 void
-CaMemory::deleteRequest(const RequestID& requestId)
+CaMemory::deleteRequest(const RequestId& requestId)
 {
   auto search = m_requests.find(requestId);
   auto keyName = search->second.m_cert.getKeyName();
diff --git a/src/detail/ca-memory.hpp b/src/detail/ca-memory.hpp
index b4cdb97..d61fc10 100644
--- a/src/detail/ca-memory.hpp
+++ b/src/detail/ca-memory.hpp
@@ -38,7 +38,7 @@
    * @throw if request cannot be fetched from underlying data storage
    */
   RequestState
-  getRequest(const RequestID& requestId) override;
+  getRequest(const RequestId& requestId) override;
 
   /**
    * @throw if there is an existing request with the same request ID
@@ -50,7 +50,7 @@
   updateRequest(const RequestState& request) override;
 
   void
-  deleteRequest(const RequestID& requestId) override;
+  deleteRequest(const RequestId& requestId) override;
 
   std::list<RequestState>
   listAllRequests() override;
@@ -59,7 +59,7 @@
   listAllRequests(const Name& caName) override;
 
 private:
-  std::map<RequestID, RequestState> m_requests;
+  std::map<RequestId, RequestState> m_requests;
 };
 
 } // namespace ca
diff --git a/src/detail/ca-request-state.cpp b/src/detail/ca-request-state.cpp
index c1f5875..3d69969 100644
--- a/src/detail/ca-request-state.cpp
+++ b/src/detail/ca-request-state.cpp
@@ -60,7 +60,7 @@
 {
 }
 
-RequestState::RequestState(const Name& caName, const RequestID& requestId, RequestType requestType, Status status,
+RequestState::RequestState(const Name& caName, const RequestId& requestId, RequestType requestType, Status status,
                  const security::Certificate& cert, Block encryptionKey, uint32_t aesBlockCounter)
     : m_caPrefix(caName)
     , m_requestId(requestId)
@@ -72,7 +72,7 @@
 {
 }
 
-RequestState::RequestState(const Name& caName, const RequestID& requestId, RequestType requestType, Status status,
+RequestState::RequestState(const Name& caName, const RequestId& requestId, RequestType requestType, Status status,
                  const security::Certificate& cert, const std::string& challengeType,
                  const std::string& challengeStatus, const time::system_clock::TimePoint& challengeTp,
                  size_t remainingTries, time::seconds remainingTime, JsonSection&& challengeSecrets,
diff --git a/src/detail/ca-request-state.hpp b/src/detail/ca-request-state.hpp
index e5876b1..a90d44f 100644
--- a/src/detail/ca-request-state.hpp
+++ b/src/detail/ca-request-state.hpp
@@ -27,7 +27,7 @@
 namespace ndn {
 namespace ndncert {
 
-typedef std::array<uint8_t, 8> RequestID;
+typedef std::array<uint8_t, 8> RequestId;
 
 enum class Status : uint16_t {
   BEFORE_CHALLENGE = 0,
@@ -88,12 +88,12 @@
   /**
    * @brief Used to instantiate a RequestState when challenge is not started.
    */
-  RequestState(const Name& caName, const RequestID& requestId, RequestType requestType, Status status,
+  RequestState(const Name& caName, const RequestId& requestId, RequestType requestType, Status status,
           const security::Certificate& cert, Block m_encryptionKey, uint32_t aesBlockCounter = 0);
   /**
    * @brief Used to instantiate a RequestState after challenge is started.
    */
-  RequestState(const Name& caName, const RequestID& requestId, RequestType requestType, Status status,
+  RequestState(const Name& caName, const RequestId& requestId, RequestType requestType, Status status,
           const security::Certificate& cert, const std::string& challengeType,
           const std::string& challengeStatus, const time::system_clock::TimePoint& challengeTp,
           size_t remainingTries, time::seconds remainingTime, JsonSection&& challengeSecrets,
@@ -107,7 +107,7 @@
   /**
    * @brief The ID of the request.
    */
-  RequestID m_requestId;
+  RequestId m_requestId;
   /**
    * @brief The type of the request.
    */
diff --git a/src/detail/ca-sqlite.cpp b/src/detail/ca-sqlite.cpp
index cd55be8..bc5dfd6 100644
--- a/src/detail/ca-sqlite.cpp
+++ b/src/detail/ca-sqlite.cpp
@@ -123,7 +123,7 @@
 }
 
 RequestState
-CaSqlite::getRequest(const RequestID& requestId)
+CaSqlite::getRequest(const RequestId& requestId)
 {
   Sqlite3Statement statement(m_database,
                              R"_SQLTEXT_(SELECT id, ca_name, status,
@@ -234,7 +234,7 @@
                              encryption_key, aes_block_counter
                              FROM RequestStates)_SQLTEXT_");
   while (statement.step() == SQLITE_ROW) {
-    RequestID requestId;
+    RequestId requestId;
     std::memcpy(requestId.data(), statement.getBlob(1), statement.getSize(1));
     Name caName(statement.getBlock(2));
     auto status = static_cast<Status>(statement.getInt(3));
@@ -274,7 +274,7 @@
   statement.bind(1, caName.wireEncode(), SQLITE_TRANSIENT);
 
   while (statement.step() == SQLITE_ROW) {
-    RequestID requestId;
+    RequestId requestId;
     std::memcpy(requestId.data(), statement.getBlob(1), statement.getSize(1));
     Name caName(statement.getBlock(2));
     auto status = static_cast<Status>(statement.getInt(3));
@@ -302,7 +302,7 @@
 }
 
 void
-CaSqlite::deleteRequest(const RequestID& requestId)
+CaSqlite::deleteRequest(const RequestId& requestId)
 {
   Sqlite3Statement statement(m_database,
                              R"_SQLTEXT_(DELETE FROM RequestStates WHERE request_id = ?)_SQLTEXT_");
diff --git a/src/detail/ca-sqlite.hpp b/src/detail/ca-sqlite.hpp
index 21cd565..2577a80 100644
--- a/src/detail/ca-sqlite.hpp
+++ b/src/detail/ca-sqlite.hpp
@@ -44,7 +44,7 @@
    * @throw if request cannot be fetched from underlying data storage
    */
   RequestState
-  getRequest(const RequestID& requestId) override;
+  getRequest(const RequestId& requestId) override;
 
   /**
    * @throw if there is an existing request with the same request ID
@@ -56,7 +56,7 @@
   updateRequest(const RequestState& request) override;
 
   void
-  deleteRequest(const RequestID& requestId) override;
+  deleteRequest(const RequestId& requestId) override;
 
   std::list<RequestState>
   listAllRequests() override;
diff --git a/src/detail/ca-storage.hpp b/src/detail/ca-storage.hpp
index c353f5c..40166cf 100644
--- a/src/detail/ca-storage.hpp
+++ b/src/detail/ca-storage.hpp
@@ -34,7 +34,7 @@
    * @throw if request cannot be fetched from underlying data storage
    */
   virtual RequestState
-  getRequest(const RequestID& requestId) = 0;
+  getRequest(const RequestId& requestId) = 0;
 
   /**
    * @throw if there is an existing request with the same request ID
@@ -46,7 +46,7 @@
   updateRequest(const RequestState& request) = 0;
 
   virtual void
-  deleteRequest(const RequestID& requestId) = 0;
+  deleteRequest(const RequestId& requestId) = 0;
 
   virtual std::list<RequestState>
   listAllRequests() = 0;
diff --git a/src/detail/new-renew-revoke-encoder.cpp b/src/detail/new-renew-revoke-encoder.cpp
index 043bb83..8ae6a02 100644
--- a/src/detail/new-renew-revoke-encoder.cpp
+++ b/src/detail/new-renew-revoke-encoder.cpp
@@ -80,7 +80,7 @@
 
 Block
 NewRenewRevokeEncoder::encodeDataContent(const std::vector<uint8_t>& ecdhKey, const std::array<uint8_t, 32>& salt,
-                                         const RequestID& requestId, const Status& status,
+                                         const RequestId& requestId, const Status& status,
                                          const std::list<std::string>& challenges)
 {
   Block response = makeEmptyBlock(ndn::tlv::Content);
@@ -97,7 +97,7 @@
 
 std::list<std::string>
 NewRenewRevokeEncoder::decodeDataContent(const Block& content, std::vector<uint8_t>& ecdhKey,
-                                         std::array<uint8_t, 32>& salt, RequestID& requestId, Status& status)
+                                         std::array<uint8_t, 32>& salt, RequestId& requestId, Status& status)
 {
   content.parse();
   status = static_cast<Status>(readNonNegativeInteger(content.get(tlv::Status)));
diff --git a/src/detail/new-renew-revoke-encoder.hpp b/src/detail/new-renew-revoke-encoder.hpp
index 96c6862..9803a57 100644
--- a/src/detail/new-renew-revoke-encoder.hpp
+++ b/src/detail/new-renew-revoke-encoder.hpp
@@ -39,12 +39,12 @@
 
   static Block
   encodeDataContent(const std::vector<uint8_t>& ecdhKey, const std::array<uint8_t, 32>& salt,
-                    const RequestID& requestId, const Status& status,
+                    const RequestId& requestId, const Status& status,
                     const std::list<std::string>& challenges);
 
   static std::list<std::string>
   decodeDataContent(const Block& content, std::vector<uint8_t>& ecdhKey,
-                    std::array<uint8_t, 32>& salt, RequestID& requestId, Status& status);
+                    std::array<uint8_t, 32>& salt, RequestId& requestId, Status& status);
 };
 
 } // namespace ndncert
diff --git a/src/identity-challenge/challenge-credential.cpp b/src/identity-challenge/challenge-credential.cpp
index e4f21d4..adee8b0 100644
--- a/src/identity-challenge/challenge-credential.cpp
+++ b/src/identity-challenge/challenge-credential.cpp
@@ -171,7 +171,7 @@
 
 void
 ChallengeCredential::fulfillParameters(std::vector<std::tuple<std::string, std::string>>& params,
-                                       KeyChain& keyChain, const Name& issuedCertName, const RequestID& requestId)
+                                       KeyChain& keyChain, const Name& issuedCertName, const RequestId& requestId)
 {
   auto& pib = keyChain.getPib();
   auto id = pib.getIdentity(security::extractIdentityFromCertName(issuedCertName));
diff --git a/src/identity-challenge/challenge-credential.hpp b/src/identity-challenge/challenge-credential.hpp
index 17bc979..72db981 100644
--- a/src/identity-challenge/challenge-credential.hpp
+++ b/src/identity-challenge/challenge-credential.hpp
@@ -65,7 +65,7 @@
 
   static void
   fulfillParameters(std::vector<std::tuple<std::string, std::string>>& params,
-                    KeyChain& keyChain, const Name& issuedCertName, const RequestID& requestId);
+                    KeyChain& keyChain, const Name& issuedCertName, const RequestId& requestId);
 
   // challenge parameters
   static const std::string PARAMETER_KEY_CREDENTIAL_CERT;
diff --git a/src/requester-state.hpp b/src/requester-state.hpp
index 3f6bba9..9ee0b53 100644
--- a/src/requester-state.hpp
+++ b/src/requester-state.hpp
@@ -56,7 +56,7 @@
   /**
    * @brief The CA-generated request ID for the request.
    */
-  RequestID m_requestId;
+  RequestId m_requestId;
   /**
    * @brief The current status of the request.
    */