update name assignment part

Change-Id: I9655448b2d2ed927e36e55ac49357afa0470e507
diff --git a/src/name-assignments/assignment-random.cpp b/src/name-assignments/assignment-random.cpp
index 9ebf45f..88e9a91 100644
--- a/src/name-assignments/assignment-random.cpp
+++ b/src/name-assignments/assignment-random.cpp
@@ -8,22 +8,18 @@
 namespace ndn {
 namespace ndncert {
 
-_LOG_INIT(ndncert.assignment.random);
-
 NDNCERT_REGISTER_FUNCFACTORY(AssignmentRandom, "random");
 
-AssignmentRandom::AssignmentRandom()
-    : NameAssignmentFuncFactory("random")
-{
-}
+AssignmentRandom::AssignmentRandom(const std::string& format)
+  : NameAssignmentFuncFactory("random", format)
+{}
 
-NameAssignmentFunc
-AssignmentRandom::getFunction(const std::string &factoryParam) {
-  return [](const std::vector<std::tuple<std::string, std::string>>){
-        std::vector<PartialName> names;
-        names.emplace_back(to_string(random::generateSecureWord64()));
-        return names;
-  };
+std::vector<PartialName>
+AssignmentRandom::assignName(const std::vector<std::tuple<std::string, std::string>>& params)
+{
+  std::vector<PartialName> resultList;
+  resultList.emplace_back(to_string(random::generateSecureWord64()));
+  return resultList;
 }
 
 }