NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ndnSIM
ndnSIM documentation
All Attributes
All GlobalValues
All LogComponents
All TraceSources
Todo List
Deprecated List
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
key-handle.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
22
#ifndef NDN_SECURITY_TPM_KEY_HANDLE_HPP
23
#define NDN_SECURITY_TPM_KEY_HANDLE_HPP
24
25
#include "../../common.hpp"
26
#include "../../name.hpp"
27
#include "../security-common.hpp"
28
29
namespace
ndn
{
30
namespace
security
{
31
namespace
tpm {
32
38
class
KeyHandle
: noncopyable
39
{
40
public
:
41
class
Error
:
public
std::runtime_error
42
{
43
public
:
44
explicit
45
Error
(
const
std::string& what)
46
:
std
::runtime_error(what)
47
{
48
}
49
};
50
51
public
:
52
virtual
53
~KeyHandle
();
54
58
ConstBufferPtr
59
sign
(
DigestAlgorithm
digestAlgorithm,
const
uint8_t* buf,
size_t
size)
const
;
60
64
ConstBufferPtr
65
decrypt
(
const
uint8_t* cipherText,
size_t
cipherTextLen)
const
;
66
70
ConstBufferPtr
71
derivePublicKey
()
const
;
72
73
void
74
setKeyName
(
const
Name
& keyName);
75
76
Name
77
getKeyName
()
const
;
78
79
private
:
80
virtual
ConstBufferPtr
81
doSign(
DigestAlgorithm
digestAlgorithm,
const
uint8_t* buf,
size_t
size)
const
= 0;
82
83
virtual
ConstBufferPtr
84
doDecrypt(
const
uint8_t* cipherText,
size_t
cipherTextLen)
const
= 0;
85
86
virtual
ConstBufferPtr
87
doDerivePublicKey()
const
= 0;
88
89
private
:
90
Name
m_keyName;
91
};
92
93
}
// namespace tpm
94
}
// namespace security
95
}
// namespace ndn
96
97
#endif // NDN_SECURITY_TPM_KEY_HANDLE_HPP
ndn::security::tpm::KeyHandle::setKeyName
void setKeyName(const Name &keyName)
Definition:
key-handle.cpp:49
ndn
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-strategy-choice-helper.hpp:34
ndn::security::tpm::KeyHandle::derivePublicKey
ConstBufferPtr derivePublicKey() const
Definition:
key-handle.cpp:43
ndn::security::tpm::KeyHandle::sign
ConstBufferPtr sign(DigestAlgorithm digestAlgorithm, const uint8_t *buf, size_t size) const
Definition:
key-handle.cpp:31
ndn::security::tpm::KeyHandle
Abstraction of TPM key handle.
Definition:
key-handle.hpp:38
std
STL namespace.
websocketpp::transport::asio::socket::error::security
Catch-all error for security policy errors that don't fit in other categories.
Definition:
base.hpp:79
ndn::security::tpm::KeyHandle::Error
Definition:
key-handle.hpp:41
ndn::Name
Represents an absolute name.
Definition:
name.hpp:42
ndn::security::tpm::KeyHandle::Error::Error
Error(const std::string &what)
Definition:
key-handle.hpp:45
ndn::security::tpm::KeyHandle::getKeyName
Name getKeyName() const
Definition:
key-handle.cpp:55
ndn::security::tpm::KeyHandle::~KeyHandle
virtual ~KeyHandle()
ndn::DigestAlgorithm
DigestAlgorithm
Definition:
security-common.hpp:105
ndn::security::tpm::KeyHandle::decrypt
ConstBufferPtr decrypt(const uint8_t *cipherText, size_t cipherTextLen) const
Definition:
key-handle.cpp:37
ndn::ConstBufferPtr
shared_ptr< const Buffer > ConstBufferPtr
Definition:
buffer.hpp:89
ndnSIM
ndn-cxx
src
security
tpm
key-handle.hpp
Generated on Thu Nov 2 2017 03:30:28 for ndnSIM by
1.8.11