20 #ifndef NDN_NAC_ENCRYPTOR_HPP
21 #define NDN_NAC_ENCRYPTOR_HPP
51 const Name& ckPrefix, SigningInfo ckDataSigningInfo,
53 Validator& validator, KeyChain& keyChain, Face& face);
74 encrypt(span<const uint8_t> data);
100 InMemoryStorage::const_iterator
103 return m_ims.begin();
111 InMemoryStorage::const_iterator
122 fetchKekAndPublishCkData(
const std::function<
void()>& onReady,
134 SigningInfo m_ckDataSigningInfo;
136 bool m_isKekRetrievalInProgress;
137 std::optional<Data> m_kek;
140 InMemoryStoragePersistent m_ims;
141 ScopedRegisteredPrefixHandle m_ckReg;
142 PendingInterestHandle m_kekPendingInterest;
144 KeyChain& m_keyChain;
146 Scheduler m_scheduler;
Encryptor(const Name &accessPrefix, const Name &ckPrefix, SigningInfo ckDataSigningInfo, const ErrorCallback &onFailure, Validator &validator, KeyChain &keyChain, Face &face)
EncryptedContent encrypt(span< const uint8_t > data)
Synchronously encrypt supplied data.
void regenerateCk()
Create a new content key and publish the corresponding CK data.
InMemoryStorage::const_iterator end() const
Returns end iterator of the in-memory storage ordered by name with digest.
InMemoryStorage::const_iterator begin() const
Returns begin iterator of the in-memory storage ordered by name with digest.
#define NAC_PUBLIC_WITH_TESTS_ELSE_PRIVATE
std::function< void(const ErrorCode &, const std::string &)> ErrorCallback