An CommandInterestGenerator keeps track of a timestamp and generates command interests according to the NFD Signed Command Interests protocol: http://redmine.named-data.net/projects/nfd/wiki/Command_Interests. 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... | |
An CommandInterestGenerator keeps track of a timestamp and generates command interests according to the NFD Signed Command Interests protocol: http://redmine.named-data.net/projects/nfd/wiki/Command_Interests.
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(). |