Public Member Functions | List of all members
ndn::CommandInterestGenerator Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

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.

Parameters
interestThe interest whose name is append with components.
keyChainThe KeyChain for calling sign.
certificateNameThe certificate name of the key to use for signing.
wireFormatA WireFormat object used to encode the SignatureInfo and to encode interest name for signing. If omitted, use WireFormat getDefaultWireFormat().

The documentation for this class was generated from the following files: