23 #include "../util/random.hpp" 29 : m_lastUsedTimestamp(0)
37 if (timestamp <= m_lastUsedTimestamp) {
38 timestamp = m_lastUsedTimestamp + time::milliseconds(1);
40 m_lastUsedTimestamp = timestamp;
51 : m_keyChain(keyChain)
59 m_keyChain.sign(commandInterest, params);
60 return commandInterest;
static Component fromNumber(uint64_t number)
Create a component encoded as nonNegativeInteger.
Copyright (c) 2013-2017 Regents of the University of California.
represents an Interest packet
Name prepareCommandInterestName(Name name)
Prepare name of the CommandInterest.
static time_point now() noexcept
Name & append(const Component &component)
Append a component.
Signing parameters passed to KeyChain.
CommandInterestPreparer()
CommandInterestSigner(KeyChain &keyChain)
Interest makeCommandInterest(const Name &name, const SigningInfo ¶ms=KeyChain::getDefaultSigningInfo())
Create CommandInterest.
Represents an absolute name.
uint64_t generateWord64()
Generate a non-cryptographically-secure random integer in the range [0, 2^64)
milliseconds toUnixTimestamp(const system_clock::TimePoint &point)
Convert system_clock::TimePoint to UNIX timestamp.