Helper class to create signed Interests. More...
#include <ndn-cxx/security/interest-signer.hpp>
Public Types | |
| enum | SigningFlags : uint32_t { WantNonce = 1 << 0 , WantTime = 1 << 1 , WantSeqNum = 1 << 2 } |
| Flags to indicate which elements to include in Interest signatures created with makeSignedInterest. More... | |
Public Member Functions | |
| InterestSigner (KeyChain &keyChain) | |
| Interest | makeCommandInterest (Name name, const SigningInfo ¶ms=SigningInfo()) |
| Creates and signs a command Interest. More... | |
| void | makeSignedInterest (Interest &interest, SigningInfo params=SigningInfo(), uint32_t signingFlags=WantNonce|WantTime) |
| Signs an Interest (following Packet Specification v0.3 or newer) More... | |
Helper class to create signed Interests.
The signer generates signature elements for an Interest and signs it with the KeyChain.
Definition at line 35 of file interest-signer.hpp.
| enum ndn::security::InterestSigner::SigningFlags : uint32_t |
Flags to indicate which elements to include in Interest signatures created with makeSignedInterest.
| Enumerator | |
|---|---|
| WantNonce | |
| WantTime | |
| WantSeqNum | |
Definition at line 43 of file interest-signer.hpp.
|
explicit |
Definition at line 28 of file interest-signer.cpp.
| Interest ndn::security::InterestSigner::makeCommandInterest | ( | Name | name, |
| const SigningInfo & | params = SigningInfo() |
||
| ) |
Creates and signs a command Interest.
These can be created with makeSignedInterest.
This generates a nonce and timestamp for the command Interest.
Definition at line 63 of file interest-signer.cpp.
| void ndn::security::InterestSigner::makeSignedInterest | ( | Interest & | interest, |
| SigningInfo | params = SigningInfo(), |
||
| uint32_t | signingFlags = WantNonce | WantTime |
||
| ) |
Signs an Interest (following Packet Specification v0.3 or newer)
| interest | Interest to sign |
| params | SigningInfo that provides parameters on how to sign the Interest. |
| signingFlags | Indicates which elements to include in the signature. At least one element must be specified for inclusion. |
| std::invalid_argument | No signature elements were specified for inclusion. |
Definition at line 35 of file interest-signer.cpp.