Tpm Class¶
The TPM (Trusted Platform Module) stores the private portion of a user’s cryptography keys. The format and location of stored information is indicated by the TPM locator. The TPM is designed to work with a PIB (Public Information Base) which stores public keys and related information such as certificates.
The TPM also provides functionalities of cryptographic transformation, such as signing and decryption.
A TPM consists of a unified front-end interface and a backend implementation. The front-end caches the handles of private keys which are provided by the backend implementation.
Note
A Tpm instance is created and managed only by the KeyChain. It is returned by the KeyChain getTpm() method, through which it is possible to check for the existence of private keys.
[C++]: | #include <ndn-cpp/security/tpm/tpm.hpp> Namespace:
ndn |
---|---|
[Python]: | Module: pyndn.security.tpm |
[Java]: | Package: net.named_data.jndn.security.tpm |
Tpm.hasKey Method¶
Check if the key with name keyName exists in the TPM.
[C++]: | bool hasKey(
const Name& keyName
) const;
|
---|---|
[Python]: | # Returns bool
def hasKey(self,
keyName # Name
)
|
[JavaScript]: | // Returns boolean
Tpm.prototype.hasKey = function(
keyName // Name
[, onComplete // function]
[, onError // function]
)
|
[Java]: | public final boolean hasKey(
Name keyName
)
|
Parameters: |
|
Returns: | True if the key exists. [JavaScript only: However, if onComplete is supplied then return undefined and use onComplete as described above.] |