security: Add doxygen comments
Change-Id: Ieafe4d13513e626d84ef9e621694f69844785018
diff --git a/src/security/sec-tpm-osx.hpp b/src/security/sec-tpm-osx.hpp
index 251df24..d10ce7d 100644
--- a/src/security/sec-tpm-osx.hpp
+++ b/src/security/sec-tpm-osx.hpp
@@ -5,28 +5,20 @@
* See COPYING for copyright and distribution information.
*/
-#ifndef NDN_SEC_TPM_OSX_HPP
-#define NDN_SEC_TPM_OSX_HPP
+#ifndef NDN_SECURITY_SEC_TPM_OSX_HPP
+#define NDN_SECURITY_SEC_TPM_OSX_HPP
#include "../common.hpp"
#include "sec-tpm.hpp"
-namespace ndn
-{
+namespace ndn {
class SecTpmOsx : public SecTpm {
public:
struct Error : public SecTpm::Error { Error(const std::string& what) : SecTpm::Error(what) {} };
- /**
- * constructor of OSXKeyChainTpm
- * @param keychainName the name of keychain
- */
SecTpmOsx();
- /**
- * destructor of OSXKeyChainTpm
- */
virtual
~SecTpmOsx();
@@ -35,10 +27,6 @@
virtual void
generateKeyPairInTpm(const Name& keyName, KeyType keyType, int keySize);
- /**
- * Delete a key pair of asymmetric keys.
- * @param keyName The name of the key pair.
- */
virtual void
deleteKeyPairInTpm(const Name& keyName);
@@ -47,44 +35,16 @@
virtual Block
signInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, DigestAlgorithm digestAlgorithm);
-
- /**
- * Decrypt data.
- * @param keyName The name of the decrypting key.
- * @param data The byte to be decrypted.
- * @param dataLength the length of data.
- * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric decryption is used.
- * @return The decrypted data.
- */
+
virtual ConstBufferPtr
- decryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric);
+ decryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
- /**
- * Encrypt data.
- * @param keyName The name of the encrypting key.
- * @param data The byte to be encrypted.
- * @param dataLength the length of data.
- * @param isSymmetric If true symmetric encryption is used, otherwise asymmetric decryption is used.
- * @return The encrypted data.
- */
virtual ConstBufferPtr
- encryptInTpm(const Name& keyName, const uint8_t* data, size_t dataLength, bool isSymmetric);
+ encryptInTpm(const uint8_t* data, size_t dataLength, const Name& keyName, bool isSymmetric);
- /**
- * Generate a symmetric key.
- * @param keyName The name of the key.
- * @param keyType The type of the key, e.g. KEY_TYPE_AES.
- * @param keySize The size of the key.
- */
virtual void
generateSymmetricKeyInTpm(const Name& keyName, KeyType keyType, int keySize);
- /**
- * Check if a particular key exists.
- * @param keyName The name of the key.
- * @param keyClass The class of the key, e.g. KEY_CLASS_PUBLIC, KEY_CLASS_PRIVATE, or KEY_CLASS_SYMMETRIC.
- * @return True if the key exists, otherwise false.
- */
virtual bool
doesKeyExistInTpm(const Name& keyName, KeyClass keyClass);
@@ -97,7 +57,8 @@
////////////////////////////////////////////////////////////////////////////////////
/**
- * configure ACL of a particular key
+ * @brief Configure ACL of a particular key.
+ *
* @param keyName the name of key
* @param keyClass the class of key, e.g. Private Key
* @param acl the new acl of the key
@@ -127,4 +88,4 @@
} // namespace ndn
-#endif // NDN_SEC_TPM_OSX_HPP
+#endif // NDN_SECURITY_SEC_TPM_OSX_HPP