CommandInterestSigner is a helper class to create command interests. More...
#include <command-interest-signer.hpp>
Public Member Functions | |
| CommandInterestSigner (KeyChain &keyChain) | |
| Create a CommandInterestSigner to use the keyChain to sign. More... | |
| ptr_lib::shared_ptr< Interest > | makeCommandInterest (const Name &name, const SigningInfo ¶ms=KeyChain::getDefaultSigningInfo(), WireFormat &wireFormat=*WireFormat::getDefaultWireFormat()) |
| Append the timestamp and nonce name components to the supplied name, create an Interest object and signs it with the KeyChain given to the constructor. 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... | |
CommandInterestSigner is a helper class to create command interests.
This keeps track of a timestamp and generates command interests by adding name components according to the NFD Signed Command Interests protocol. See makeCommandInterest() for details. https://redmine.named-data.net/projects/ndn-cxx/wiki/CommandInterest
| ndn::CommandInterestSigner::CommandInterestSigner | ( | KeyChain & | keyChain | ) |
Create a CommandInterestSigner to use the keyChain to sign.
| keyChain | The KeyChain used to sign. |
| ptr_lib::shared_ptr< Interest > ndn::CommandInterestSigner::makeCommandInterest | ( | const Name & | name, |
| const SigningInfo & | params = KeyChain::getDefaultSigningInfo(), |
||
| WireFormat & | wireFormat = *WireFormat::getDefaultWireFormat() |
||
| ) |
Append the timestamp and nonce name components to the supplied name, create an Interest object and signs it with the KeyChain given to the constructor.
This ensures that the timestamp is greater than the timestamp used in the previous call.
| name | The Name for the Interest, which is copied. |
| params | (optional) The signing parameters. If omitted, use a default SigningInfo(). |
| wireFormat | (optional) A WireFormat object used to encode the SignatureInfo and to encode interest name for signing. If omitted, use WireFormat getDefaultWireFormat(). |
1.8.6