29 : m_lastUsedTimestamp(0)
37 if (timestamp <= m_lastUsedTimestamp) {
38 timestamp = m_lastUsedTimestamp + 1_ms;
40 m_lastUsedTimestamp = timestamp;
51 : m_keyChain(keyChain)
60 m_keyChain.
sign(commandInterest, params);
61 return commandInterest;
The interface of signing key management.
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.
void sign(Data &data, const SigningInfo ¶ms=getDefaultSigningInfo())
Sign data according to the supplied signing information.
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.
static Component fromNumber(uint64_t number, uint32_t type=tlv::GenericNameComponent)
Create a component encoded as nonNegativeInteger.
Interest & setCanBePrefix(bool canBePrefix)
Add or remove CanBePrefix element.