22 #ifndef NDN_SECURITY_TPM_TPM_HPP    23 #define NDN_SECURITY_TPM_TPM_HPP    29 #include <unordered_map>    30 #include <boost/logic/tribool.hpp>    65 class Tpm : noncopyable
    68   class Error : 
public std::runtime_error
    71     using std::runtime_error::runtime_error;
    77   getTpmLocator() 
const;
    86   hasKey(
const Name& keyName) 
const;
    95   getPublicKey(
const Name& keyName) 
const;
   112   boost::logic::tribool
   113   verify(
const uint8_t* buf, 
size_t bufLen, 
const uint8_t* 
sig, 
size_t sigLen,
   122   decrypt(
const uint8_t* buf, 
size_t size, 
const Name& keyName) 
const;
   129   isTerminalMode() 
const;
   137   setTerminalMode(
bool isTerminal) 
const;
   152   unlockTpm(
const char* password, 
size_t passwordLength) 
const;
   162   Tpm(
const std::string& scheme, 
const std::string& location, unique_ptr<BackEnd> impl);
   175   createKey(
const Name& identityName, 
const KeyParams& params);
   181   deleteKey(
const Name& keyName);
   195   exportPrivateKey(
const Name& keyName, 
const char* pw, 
size_t pwLen) 
const;
   208   importPrivateKey(
const Name& keyName, 
const uint8_t* pkcs8, 
size_t pkcs8Len,
   209                    const char* pw, 
size_t pwLen);
   215   importPrivateKey(
const Name& keyName, shared_ptr<transform::PrivateKey> key);
   235   findKey(
const Name& keyName) 
const;
   238   std::string m_scheme;
   239   std::string m_location;
   241   mutable std::unordered_map<Name, unique_ptr<KeyHandle>> m_keys;
   243   const unique_ptr<BackEnd> m_backEnd;
   255 #endif // NDN_SECURITY_TPM_TPM_HPP 
The interface of signing key management. 
Abstraction of TPM key handle. 
#define NDN_CXX_NODISCARD
#define NDN_CXX_PUBLIC_WITH_TESTS_ELSE_PRIVATE
Represents an absolute name. 
Base class for key parameters. 
shared_ptr< const Buffer > ConstBufferPtr