Migrate to C++17 and refactor

Change-Id: I53407266939258990a1c3a9363c3ebe9ea113fd2
diff --git a/src/detail/challenge-encoder.cpp b/src/detail/challenge-encoder.cpp
index 1a7a83d..9f36042 100644
--- a/src/detail/challenge-encoder.cpp
+++ b/src/detail/challenge-encoder.cpp
@@ -20,10 +20,10 @@
 
 #include "detail/challenge-encoder.hpp"
 
-namespace ndncert {
+namespace ndncert::challengetlv {
 
 Block
-challengetlv::encodeDataContent(ca::RequestState& request, const Name& issuedCertName)
+encodeDataContent(ca::RequestState& request, const Name& issuedCertName)
 {
   Block response(tlv::EncryptedPayload);
   response.push_back(ndn::makeNonNegativeIntegerBlock(tlv::Status, static_cast<uint64_t>(request.status)));
@@ -52,7 +52,7 @@
 }
 
 void
-challengetlv::decodeDataContent(const Block& contentBlock, requester::Request& state)
+decodeDataContent(const Block& contentBlock, requester::Request& state)
 {
   auto result = decodeBlockWithAesGcm128(contentBlock, state.m_aesKey.data(),
                                          state.m_requestId.data(), state.m_requestId.size(),
@@ -122,4 +122,4 @@
   }
 }
 
-} // namespace ndncert
+} // namespace ndncert::challengetlv