An CommandInterestGenerator keeps track of a timestamp and generates command interests according to the NFD Signed Command Interests protocol: https://redmine.named-data.net/projects/ndn-cxx/wiki/CommandInterest. More...
#include <command-interest-generator.hpp>
Public Member Functions | |
| CommandInterestGenerator () | |
| Create a new CommandInterestGenerator and initialize the timestamp to now. | |
| void | generate (Interest &interest, KeyChain &keyChain, const Name &certificateName, WireFormat &wireFormat=*WireFormat::getDefaultWireFormat()) |
| Append a timestamp component and a random value component to interest's name. More... | |
Public Member Functions inherited from ndn::CommandInterestPreparer | |
| CommandInterestPreparer () | |
| Create a CommandInterestPreparer and initialize the timestamp to now. | |
| void | prepareCommandInterestName (Interest &interest, WireFormat &wireFormat=*WireFormat::getDefaultWireFormat()) |
| Append a timestamp component and a random nonce component to interest's name. More... | |
| void | setNowOffsetMilliseconds_ (Milliseconds nowOffsetMilliseconds) |
| Set the offset for when prepareCommandInterestName() gets the current time, which should only be used for testing. More... | |
An CommandInterestGenerator keeps track of a timestamp and generates command interests according to the NFD Signed Command Interests protocol: https://redmine.named-data.net/projects/ndn-cxx/wiki/CommandInterest.
| void ndn::CommandInterestGenerator::generate | ( | Interest & | interest, |
| KeyChain & | keyChain, | ||
| const Name & | certificateName, | ||
| WireFormat & | wireFormat = *WireFormat::getDefaultWireFormat() |
||
| ) |
Append a timestamp component and a random value component to interest's name.
This ensures that the timestamp is greater than the timestamp used in the previous call. Then use keyChain to sign the interest which appends a SignatureInfo component and a component with the signature bits. If the interest lifetime is not set, this sets it.
| interest | The interest whose name is append with components. |
| keyChain | The KeyChain for calling sign. |
| certificateName | The certificate name of the key to use for signing. |
| wireFormat | A WireFormat object used to encode the SignatureInfo and to encode interest name for signing. If omitted, use WireFormat getDefaultWireFormat(). |
1.8.6