Class: CommandInterestPreparer

CommandInterestPreparer()

new CommandInterestPreparer()

A CommandInterestPreparer keeps track of a timestamp and prepares a command interest by adding a timestamp and nonce to the name of an Interest. This class is primarily designed to be used by the CommandInterestSigner, but can also be using in an application that defines custom signing methods not supported by the KeyChain (such as HMAC-SHA1). See the Command Interest documentation: https://redmine.named-data.net/projects/ndn-cxx/wiki/CommandInterest Create a CommandInterestPreparer and initialize the timestamp to now.
Source:

Methods

prepareCommandInterestName(interest, wireFormat)

Append a timestamp component and a random nonce component to interest's name. This ensures that the timestamp is greater than the timestamp used in the previous call.
Parameters:
Name Type Description
interest Interest The interest whose name is append with components.
wireFormat WireFormat (optional) A WireFormat object used to encode the SignatureInfo. If omitted, use WireFormat getDefaultWireFormat().
Source:

setNowOffsetMilliseconds_(nowOffsetMilliseconds)

Set the offset for when prepareCommandInterestName() gets the current time, which should only be used for testing.
Parameters:
Name Type Description
nowOffsetMilliseconds number The offset in milliseconds.
Source: