diff --git a/src/security/key-chain.hpp b/src/security/key-chain.hpp
index db71884..30efa12 100644
--- a/src/security/key-chain.hpp
+++ b/src/security/key-chain.hpp
@@ -102,7 +102,7 @@
   /**
    * @brief prepare an unsigned identity certificate
    *
-   * @param keyName Key name, e.g., /<identity_name>/ksk-123456.
+   * @param keyName Key name, e.g., `/<identity_name>/ksk-123456`.
    * @param signingIdentity The signing identity.
    * @param notBefore Refer to IdentityCertificate.
    * @param notAfter Refer to IdentityCertificate.
@@ -177,9 +177,7 @@
   signByIdentity(const uint8_t* buffer, size_t bufferLength, const Name& identityName);
 
   /**
-   * @brief Set Sha256 weak signature.
-   *
-   * @param data.
+   * @brief Set Sha256 weak signature for @param data
    */
   inline void
   signWithSha256(Data& data);
@@ -187,8 +185,8 @@
   /**
    * @brief Generate a self-signed certificate for a public key.
    *
-   * @param keyName The name of the public key.
-   * @return The generated certificate, NULL if selfSign fails.
+   * @param keyName The name of the public key
+   * @return The generated certificate, shared_ptr<IdentityCertificate>() if selfSign fails
    */
   shared_ptr<IdentityCertificate>
   selfSign(const Name& keyName);
diff --git a/src/security/public-key.cpp b/src/security/public-key.cpp
index 9449cc9..17f204b 100644
--- a/src/security/public-key.cpp
+++ b/src/security/public-key.cpp
@@ -28,11 +28,6 @@
 {
 }
 
-/**
- * Create a new PublicKey with the given values.
- * @param algorithm The algorithm of the public key.
- * @param keyDer The blob of the PublicKeyInfo in terms of DER.
- */
 PublicKey::PublicKey(const uint8_t* keyDerBuf, size_t keyDerSize)
 {
   StringSource src(keyDerBuf, keyDerSize, true);
diff --git a/src/security/public-key.hpp b/src/security/public-key.hpp
index 1ed567c..e939978 100644
--- a/src/security/public-key.hpp
+++ b/src/security/public-key.hpp
@@ -43,11 +43,12 @@
   PublicKey();
 
   /**
-   * Create a new PublicKey with the given values.
-   * @param algorithm The algorithm of the public key.
-   * @param keyDer The blob of the PublicKeyInfo in terms of DER.
+   * @brief Create a new PublicKey from @param keyDerBuf in DER buffer
    *
-   * @throws PublicKey::Error If algorithm is not supported or keyDer cannot be decoded
+   * @param keyDerBuf The pointer to the first byte of buffer containing DER of public key
+   * @param keyDerSize Size of the buffer
+   *
+   * @throws PublicKey::Error If DER in buffer cannot be decoded
    */
   PublicKey(const uint8_t* keyDerBuf, size_t keyDerSize);
 
diff --git a/src/security/sec-public-info.hpp b/src/security/sec-public-info.hpp
index 790ad36..1949d51 100644
--- a/src/security/sec-public-info.hpp
+++ b/src/security/sec-public-info.hpp
@@ -44,7 +44,7 @@
   };
 
   /**
-   * @brief The virtual Destructor.
+   * @brief The virtual Destructor
    */
   virtual
   ~SecPublicInfo()
@@ -52,37 +52,37 @@
   }
 
   /**
-   * @brief Check if the specified identity already exists.
+   * @brief Check if the specified identity already exists
    *
-   * @param identityName The identity name.
-   * @return true if the identity exists, otherwise false.
+   * @param identityName The identity name
+   * @return true if the identity exists, otherwise false
    */
   virtual bool
   doesIdentityExist(const Name& identityName) = 0;
 
   /**
-   * @brief Add a new identity.
+   * @brief Add a new identity
    *
-   * if identity already exist, do not add it again.
+   * if identity already exist, do not add it again
    *
-   * @param identityName The identity name to be added.
+   * @param identityName The identity name to be added
    */
   virtual void
   addIdentity(const Name& identityName) = 0;
 
   /**
-   * @brief Revoke the identity.
+   * @brief Revoke the identity
    *
-   * @return true if the identity was revoked, otherwise false.
+   * @return true if the identity was revoked, otherwise false
    */
   virtual bool
   revokeIdentity() = 0;
 
   /**
-   * @brief Check if the specified key already exists.
+   * @brief Check if the specified key already exists
    *
-   * @param keyName The name of the key.
-   * @return true if the key exists, otherwise false.
+   * @param keyName The name of the key
+   * @return true if the key exists, otherwise false
    */
   virtual bool
   doesPublicKeyExist(const Name& keyName) = 0;
@@ -90,28 +90,26 @@
   /**
    * @brief Add a public key to the identity storage.
    *
-   * @param keyName The name of the public key to be added.
-   * @param keyType Type of the public key to be added.
-   * @param publicKeyDer A blob of the public key DER to be added.
+   * @param keyName The name of the public key to be added
+   * @param keyType Type of the public key to be added
+   * @param publicKey Reference to the PublicKey object
    */
   virtual void
-  addPublicKey(const Name& keyName, KeyType keyType, const PublicKey& publicKeyDer) = 0;
+  addPublicKey(const Name& keyName, KeyType keyType, const PublicKey& publicKey) = 0;
 
   /**
-   * @brief Get the public key DER blob from the identity storage.
+   * @brief Get shared pointer to PublicKey object from the identity storage
    *
-   * @param keyName The name of the requested public key.
-   * @return The DER Blob.
-   * @throws SecPublicInfo::Error if public key does not exist.
+   * @param keyName The name of the requested public key
+   * @throws SecPublicInfo::Error if public key does not exist
    */
   virtual shared_ptr<PublicKey>
   getPublicKey(const Name& keyName) = 0;
 
   /**
-   * @brief Check if the specified certificate already exists.
+   * @brief Check if the specified certificate already exists
    *
-   * @param certificateName The name of the certificate.
-   * @return true if the certificate exists, otherwise false.
+   * @param certificateName The name of the certificate
    */
   virtual bool
   doesCertificateExist(const Name& certificateName) = 0;
@@ -119,19 +117,18 @@
   /**
    * @brief Add a certificate to the identity storage.
    *
-   * It will add the corresponding public key and identity if they do not exist.
+   * It will add the corresponding public key and identity if they do not exist
    *
-   * @param certificate The certificate to be added.
+   * @param certificate The certificate to be added
    */
   virtual void
   addCertificate(const IdentityCertificate& certificate) = 0;
 
   /**
-   * @brief Get a certificate from the identity storage.
+   * @brief Get a shared pointer to identity certificate object from the identity storage
    *
-   * @param certificateName The name of the requested certificate.
-   * @return The requested certificate.
-   * @throws SecPublicInfo::Error if the certificate does not exist.
+   * @param certificateName The name of the requested certificate
+   * @throws SecPublicInfo::Error if the certificate does not exist
    */
   virtual shared_ptr<IdentityCertificate>
   getCertificate(const Name& certificateName) = 0;
@@ -142,77 +139,74 @@
    *****************************************/
 
   /**
-   * @brief Get the default identity.
+   * @brief Get name of the default identity
    *
-   * @param return The name of default identity,
    * @throws SecPublicInfo::Error if there is no default.
    */
   virtual Name
   getDefaultIdentity() = 0;
 
   /**
-   * @brief Get the default key name for the specified identity.
+   * @brief Get name of the default key name for the specified identity
    *
-   * @param identityName The identity name.
-   * @return The default key name.
-   * @throws SecPublicInfo::Error if there is no default.
+   * @param identityName The identity name
+   * @throws SecPublicInfo::Error if there is no default
    */
   virtual Name
   getDefaultKeyNameForIdentity(const Name& identityName) = 0;
 
   /**
-   * @brief Get the default certificate name for the specified key.
+   * @brief Get name of the default certificate name for the specified key
    *
    * @param keyName The key name.
-   * @return The default certificate name.
    * @throws SecPublicInfo::Error if there is no default.
    */
   virtual Name
   getDefaultCertificateNameForKey(const Name& keyName) = 0;
 
   /**
-   * @brief Get all the identities in public info.
+   * @brief Get all the identities from public info
    *
-   * @param nameList On return, the identity list.
-   * @param isDefault If specified, only the default identity is returned.
+   * @param [out] nameList On return, the identity list
+   * @param isDefault      If specified, only the default identity is returned
    */
   virtual void
   getAllIdentities(std::vector<Name>& nameList, bool isDefault) = 0;
 
   /**
-   * @brief Get all the key name in public info.
+   * @brief Get all the key names from public info
    *
-   * @param nameList On return, the key name list.
-   * @param isDefault If specified, only the default keys are returned.
+   * @param [out] nameList On return, the key name list.
+   * @param isDefault      If specified, only the default keys are returned
    */
   virtual void
   getAllKeyNames(std::vector<Name>& nameList, bool isDefault) = 0;
 
   /**
-   * @brief Get all the key name of a particular identity.
+   * @brief Get all the key names of a particular identity
    *
-   * @param identity The specified identity name.
-   * @param nameList On return, the key name list.
-   * @param isDefault If specified, only the default key is returned.
+   * @param identity       The specified identity name
+   * @param [out] nameList On return, the key name list
+   * @param isDefault      If specified, only the default key is returned
    */
   virtual void
   getAllKeyNamesOfIdentity(const Name& identity, std::vector<Name>& nameList, bool isDefault) = 0;
 
   /**
-   * @brief Get all the certificate name in public info.
+   * @brief Get all the certificate name in public info
    *
-   * @param nameList On return, the certificate name list.
-   * @param isDefault If specified, only the default certificates are returned.
+   * @param [out] nameList On return, the certificate name list
+   * @param isDefault      If specified, only the default certificates are returned
    */
   virtual void
   getAllCertificateNames(std::vector<Name>& nameList, bool isDefault) = 0;
 
   /**
-   * @brief Get all the certificate name of a particular key.
+   * @brief Get all the certificate name of a particular key name
    *
-   * @param identity The specified key name.
-   * @param nameList On return, the certificate name list.
-   * @param isDefault If specified, only the default certificate is returned.
+   * @param keyName        The specified key name
+   * @param [out] nameList On return, the certificate name list
+   * @param isDefault      If specified, only the default certificate is returned
    */
   virtual void
   getAllCertificateNamesOfKey(const Name& keyName, std::vector<Name>& nameList, bool isDefault) = 0;
@@ -222,25 +216,25 @@
    *****************************************/
 
   /**
-   * @brief Delete a certificate.
+   * @brief Delete a certificate
    *
-   * @param certificateName The certificate name.
+   * @param certificateName The certificate name
    */
   virtual void
   deleteCertificateInfo(const Name& certificateName) = 0;
 
   /**
-   * @brief Delete a public key and related certificates.
+   * @brief Delete a public key and related certificates
    *
-   * @param keyName The key name.
+   * @param keyName The key name
    */
   virtual void
   deletePublicKeyInfo(const Name& keyName) = 0;
 
   /**
-   * @brief Delete an identity and related public keys and certificates.
+   * @brief Delete an identity and related public keys and certificates
    *
-   * @param identity The identity name.
+   * @param identity The identity name
    */
   virtual void
   deleteIdentityInfo(const Name& identity) = 0;
@@ -252,27 +246,27 @@
    *****************************************/
 
   /**
-   * @brief Set the default identity.
+   * @brief Set the default identity
    *
-   * @param identityName The default identity name.
+   * @param identityName The default identity name
    */
   virtual void
   setDefaultIdentityInternal(const Name& identityName) = 0;
 
   /**
-   * @brief Set the default key name for the corresponding identity.
+   * @brief Set the default key name for the corresponding identity
    *
-   * @param keyName The key name.
-   * @throws SecPublicInfo::Error if the key does not exist.
+   * @param keyName The key name
+   * @throws SecPublicInfo::Error if the key does not exist
    */
   virtual void
   setDefaultKeyNameForIdentityInternal(const Name& keyName) = 0;
 
   /**
-   * @brief Set the default certificate name for the corresponding key.
+   * @brief Set the default certificate name for the corresponding key
    *
-   * @param certificateName The certificate name.
-   * @throws SecPublicInfo::Error if the certificatedoes not exist.
+   * @param certificateName The certificate name
+   * @throws SecPublicInfo::Error if the certificate does not exist
    */
   virtual void
   setDefaultCertificateNameForKeyInternal(const Name& certificateName) = 0;
@@ -284,48 +278,48 @@
    *****************************************/
 
   /**
-   * @brief Set the default identity.
+   * @brief Set the default identity
    *
-   * @param identityName The default identity name.
-   * @throws SecPublicInfo::Error if the identity does not exist.
+   * @param identityName The default identity name
+   * @throws SecPublicInfo::Error if the identity does not exist
    */
   inline void
   setDefaultIdentity(const Name& identityName);
 
   /**
-   * @brief Set the default key name for the corresponding identity.
+   * @brief Set the default key name for the corresponding identity
    *
-   * @param keyName The key name.
-   * @throws SecPublicInfo::Error if either the identity or key does not exist.
+   * @param keyName The key name
+   * @throws SecPublicInfo::Error if either the identity or key does not exist
    */
   inline void
   setDefaultKeyNameForIdentity(const Name& keyName);
 
   /**
-   * @brief Set the default certificate name for the corresponding key.
+   * @brief Set the default certificate name for the corresponding key
    *
-   * @param certificateName The certificate name.
-   * @throws SecPublicInfo::Error if either the certificate or key does not exist.
+   * @param certificateName The certificate name
+   * @throws SecPublicInfo::Error if either the certificate or key does not exist
    */
   inline void
   setDefaultCertificateNameForKey(const Name& certificateName);
 
   /**
-   * @brief Generate a key name for the identity.
+   * @brief Generate a key name for the identity
    *
-   * @param identityName The identity name.
-   * @param useKsk If true, generate a KSK name, otherwise a DSK name.
-   * @return The generated key name.
+   * @param identityName The identity name
+   * @param useKsk If true, generate a KSK name, otherwise a DSK name
+   * @return The generated key name
    */
   inline Name
   getNewKeyName(const Name& identityName, bool useKsk);
 
   /**
-   * @brief Get the default certificate name for the specified identity.
+   * @brief Get the default certificate name for the specified identity
    *
-   * @param identityName The identity name.
-   * @return The default certificate name.
-   * @throws SecPublicInfo::Error if no certificate is found.
+   * @param identityName The identity name
+   * @return The default certificate name
+   * @throws SecPublicInfo::Error if no certificate is found
    */
   inline Name
   getDefaultCertificateNameForIdentity(const Name& identityName);
@@ -333,16 +327,16 @@
   /**
    * @brief Get the default certificate name of the default identity
    *
-   * @return The requested certificate name.
-   * @throws SecPublicInfo::Error if no certificate is found.
+   * @return The requested certificate name
+   * @throws SecPublicInfo::Error if no certificate is found
    */
   inline Name
   getDefaultCertificateName();
 
   /**
-   * @brief Add a certificate and set the certificate as the default one of its corresponding key.
+   * @brief Add a certificate and set the certificate as the default one of its corresponding key
    *
-   * @param certificate The certificate to be added.
+   * @param certificate The certificate to be added
    * @throws SecPublicInfo::Error if the certificate cannot be added (though it is really rare)
    */
   inline void
@@ -350,9 +344,9 @@
 
   /**
    * @brief Add a certificate into the public key identity storage and set the certificate as the
-   *        default one of its corresponding identity.
+   *        default one of its corresponding identity
    *
-   * @param certificate The certificate to be added.
+   * @param certificate The certificate to be added
    * @throws SecPublicInfo::Error if the certificate cannot be added (though it is really rare)
    */
   inline void
@@ -360,24 +354,24 @@
 
   /**
    * @brief Add a certificate into the public key identity storage and set the certificate as the
-   *        default one of the default identity.
+   *        default one of the default identity
    *
-   * @param certificate The certificate to be added.
+   * @param certificate The certificate to be added
    * @throws SecPublicInfo::Error if the certificate cannot be added (though it is really rare)
    */
   inline void
   addCertificateAsSystemDefault(const IdentityCertificate& certificate);
 
   /**
-   * @brief get cached default certificate of the default identity.
+   * @brief Get cached default certificate of the default identity
    *
-   * @return The certificate which might be a NULL pointer.
+   * @return The certificate which might be empty shared_ptr<IdentityCertificate>()
    */
   inline shared_ptr<IdentityCertificate>
   defaultCertificate();
 
   /**
-   * @brief try to get the default certificate of the default identity from the public info.
+   * @brief try to get the default certificate of the default identity from the public info
    */
   inline void
   refreshDefaultCertificate();
diff --git a/src/security/sec-tpm-file.hpp b/src/security/sec-tpm-file.hpp
index 0f1d8be..d9f95c4 100644
--- a/src/security/sec-tpm-file.hpp
+++ b/src/security/sec-tpm-file.hpp
@@ -60,7 +60,7 @@
   }
 
   virtual bool
-  getInTerminal()
+  getInTerminal() const
   {
     return m_inTerminal;
   }
diff --git a/src/security/sec-tpm-memory.hpp b/src/security/sec-tpm-memory.hpp
index df0c7e3..e0dd34c 100644
--- a/src/security/sec-tpm-memory.hpp
+++ b/src/security/sec-tpm-memory.hpp
@@ -64,7 +64,7 @@
   }
 
   virtual bool
-  getInTerminal()
+  getInTerminal() const
   {
     return m_inTerminal;
   }
diff --git a/src/security/sec-tpm-osx.cpp b/src/security/sec-tpm-osx.cpp
index a7e1cd9..69c3deb 100644
--- a/src/security/sec-tpm-osx.cpp
+++ b/src/security/sec-tpm-osx.cpp
@@ -269,7 +269,7 @@
 }
 
 bool
-SecTpmOsx::getInTerminal()
+SecTpmOsx::getInTerminal() const
 {
   return m_impl->m_inTerminal;
 }
diff --git a/src/security/sec-tpm-osx.hpp b/src/security/sec-tpm-osx.hpp
index f7d9959..6effb67 100644
--- a/src/security/sec-tpm-osx.hpp
+++ b/src/security/sec-tpm-osx.hpp
@@ -58,7 +58,7 @@
   setInTerminal(bool inTerminal);
 
   virtual bool
-  getInTerminal();
+  getInTerminal() const;
 
   virtual bool
   isLocked();
diff --git a/src/security/sec-tpm.hpp b/src/security/sec-tpm.hpp
index 5a163c6..69b5f22 100644
--- a/src/security/sec-tpm.hpp
+++ b/src/security/sec-tpm.hpp
@@ -53,8 +53,8 @@
    * You should be cautious when using this method, because remembering password is kind of
    * dangerous.
    *
-   * @param password The password.
-   * @param passwordLength The length of password.
+   * @param password The password
+   * @param passwordLength The length of password
    */
   virtual void
   setTpmPassword(const uint8_t* password, size_t passwordLength) = 0;
@@ -66,34 +66,28 @@
   resetTpmPassword() = 0;
 
   /**
-   * @brief set inTerminal flag
+   * @brief Set inTerminal flag to @param inTerminal
    *
    * If the inTerminal flag is set, and password is not set, TPM may ask for password via terminal.
    * inTerminal flag is set by default.
-   *
-   * @param inTerminal.
    */
   virtual void
   setInTerminal(bool inTerminal) = 0;
 
   /**
-   * @brief get inTerminal flag
-   *
-   * @return inTerminal flag.
+   * @brief Get value of inTerminal flag
    */
   virtual bool
-  getInTerminal() = 0;
+  getInTerminal() const = 0;
 
   /**
-   * @brief check if TPM is locked.
-   *
-   * @return true if locked, false otherwise
+   * @brief Check if TPM is locked
    */
   virtual bool
   isLocked() = 0;
 
   /**
-   * @brief Unlock the TPM.
+   * @brief Unlock the TPM
    *
    * @param password The password.
    * @param passwordLength The password size. 0 indicates no password.
@@ -195,17 +189,17 @@
   doesKeyExistInTpm(const Name& keyName, KeyClass keyClass) = 0;
 
   /**
-   * @brief Generate a random block.
+   * @brief Generate a random block
    *
-   * @param res The pointer to the generated block.
-   * @param size The random block size.
-   * @return true for success, otherwise false.
+   * @param res The pointer to the generated block
+   * @param size The random block size
+   * @return true for success, otherwise false
    */
   virtual bool
   generateRandomBlock(uint8_t* res, size_t size) = 0;
 
   /**
-   * @brief Add the application into the ACL of a particular key.
+   * @brief Add the application into the ACL of a particular key
    *
    * @param keyName the name of key
    * @param keyClass the class of key, e.g. Private Key
@@ -216,29 +210,31 @@
   addAppToAcl(const Name& keyName, KeyClass keyClass, const std::string& appPath, AclType acl) = 0;
 
   /**
-   * @brief Export a private key in PKCS#5 format.
+   * @brief Export a private key in PKCS#5 format
    *
-   * @param keyName The private key name.
-   * @param password The password to encrypt the private key.
-   * @return The private key info (in PKCS8 format) if exist.
-   * @throws SecTpm::Error if private key cannot be exported.
+   * @param keyName  The private key name
+   * @param password The password to encrypt the private key
+   * @return The private key info (in PKCS8 format) if exist
+   * @throws SecTpm::Error if private key cannot be exported
    */
   ConstBufferPtr
   exportPrivateKeyPkcs5FromTpm(const Name& keyName, const std::string& password);
 
   /**
-   * @brief Import a private key in PKCS#5 format.
+   * @brief Import a private key in PKCS#5 formatted @param buffer of size @param bufferSize
    *
    * Also recover the public key and installed it in TPM.
    *
-   * @param keyName The private key name.
-   * @param key The encoded private key info.
-   * @param password The password to encrypt the private key.
-   * @return False if import fails.
+   * @param keyName    The private key name
+   * @param buffer     Pointer to the first byte of the buffer containing PKCS#5-encoded
+   *                   private key info
+   * @param bufferSize Size of the buffer
+   * @param password   The password to encrypt the private key
+   * @return false if import fails
    */
   bool
   importPrivateKeyPkcs5IntoTpm(const Name& keyName,
-                               const uint8_t* buf, size_t size,
+                               const uint8_t* buffer, size_t bufferSize,
                                const std::string& password);
 
 protected:
@@ -252,25 +248,28 @@
   exportPrivateKeyPkcs8FromTpm(const Name& keyName) = 0;
 
   /**
-   * @brief Import a private key in PKCS#8 format.
+   * @brief Import a private key from PKCS#8 formatted @param buffer of size @param bufferSize
    *
-   * @param keyName The private key name.
-   * @param key The encoded private key info.
-   * @return False if import fails.
+   * @param keyName    The private key name.
+   * @param buffer     Pointer to the first byte of the buffer containing PKCS#8-encoded
+   *                   private key info
+   * @param bufferSize Size of the buffer
+   * @return false if import fails
    */
   virtual bool
-  importPrivateKeyPkcs8IntoTpm(const Name& keyName, const uint8_t* buf, size_t size) = 0;
+  importPrivateKeyPkcs8IntoTpm(const Name& keyName, const uint8_t* buffer, size_t bufferSize) = 0;
 
   /**
-   * @brief Import a public key in PKCS#1 format.
+   * @brief Import a public key in PKCS#1 formatted @param buffer of size @param bufferSize
    *
-   * @param keyName The public key name.
-   * @param key The encoded public key info.
-   * @return False if import fails.
+   * @param keyName    The public key name
+   * @param buffer     Pointer to the first byte of the buffer containing PKCS#1-encoded
+   *                   private key info
+   * @param bufferSize Size of the buffer
+   * @return false if import fails
    */
   virtual bool
-  importPublicKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buf, size_t size) = 0;
-
+  importPublicKeyPkcs1IntoTpm(const Name& keyName, const uint8_t* buffer, size_t bufferSize) = 0;
 
   /**
    * @brief Get import/export password.
diff --git a/src/security/validator-regex.hpp b/src/security/validator-regex.hpp
index fd006c4..e0977a8 100644
--- a/src/security/validator-regex.hpp
+++ b/src/security/validator-regex.hpp
@@ -50,7 +50,7 @@
   /**
    * @brief Add a rule for data verification.
    *
-   * @param policy The verification rule
+   * @param rule The verification rule
    */
   inline void
   addDataVerificationRule(shared_ptr<SecRuleRelative> rule);
diff --git a/src/security/validator.hpp b/src/security/validator.hpp
index c6fac7a..88f1d63 100644
--- a/src/security/validator.hpp
+++ b/src/security/validator.hpp
@@ -184,7 +184,6 @@
   static bool
   verifySignature(const uint8_t* buf, const size_t size, const SignatureSha256& sig);
 
-
 protected:
   /**
    * @brief Check the Data against policy and return the next validation step if necessary.
@@ -192,11 +191,11 @@
    * If there is no next validation step, that validation MUST have been done.
    * i.e., either onValidated or onValidationFailed callback is invoked.
    *
-   * @param data The Data to check.
-   * @param nSteps The number of validation steps that have been done.
-   * @param onDataValidated If the Data is validated, this calls onValidated(data).
-   * @param onDataValidationFailed If validation fails, this calls onValidationFailed(data).
-   * @param nextSteps On return, contains the next validation step.
+   * @param data               The Data to check.
+   * @param nSteps             The number of validation steps that have been done.
+   * @param onValidated        If the Data is validated, this calls onValidated(data)
+   * @param onValidationFailed If validation fails, this calls onValidationFailed(data)
+   * @param nextSteps          On return, contains the next validation step
    */
   virtual void
   checkPolicy(const Data& data,
@@ -212,11 +211,11 @@
    * If there is no next validation step, that validation MUST have been done.
    * i.e., either onValidated or onValidationFailed callback is invoked.
    *
-   * @param data The Interest to check.
-   * @param nSteps The number of validation steps that have been done.
-   * @param OnInterestValidated If the Interest is validated, this calls onValidated(data).
-   * @param OnInterestValidationFailed If validation fails, this calls onValidationFailed(data).
-   * @return the indication of next validation step, null if there is no further step.
+   * @param interest           The Interest to check.
+   * @param nSteps             The number of validation steps that have been done.
+   * @param onValidated        If the Interest is validated, this calls onValidated(data)
+   * @param onValidationFailed If validation fails, this calls onValidationFailed(data)
+   * @param nextSteps          On return, contains the next validation step
    */
   virtual void
   checkPolicy(const Interest& interest,
