|
bool | update (const std::string &dataPrefix, int sessionNo, int sequenceNo) |
| Update the digest tree and recompute the root digest. More...
|
|
int | find (const std::string &dataPrefix, int sessionNo) const |
|
size_t | size () const |
|
const DigestTree::Node & | get (size_t i) const |
|
const std::string & | getRoot () const |
| Get the root digest. More...
|
|
const std::string& ndn::DigestTree::getRoot |
( |
| ) |
const |
|
inline |
Get the root digest.
- Returns
- The root digest as a hex string.
bool ndn::DigestTree::update |
( |
const std::string & |
dataPrefix, |
|
|
int |
sessionNo, |
|
|
int |
sequenceNo |
|
) |
| |
Update the digest tree and recompute the root digest.
If the combination of dataPrefix and sessionNo already exists in the tree then update its sequenceNo (only if the given sequenceNo is newer), otherwise add a new node.
- Parameters
-
dataPrefix | The name prefix. |
sessionNo | The session number. |
sequenceNo | The new sequence number. |
- Returns
- True if the digest tree is updated, false if not (because the given sequenceNo is not newer than the existing sequence number).
The documentation for this class was generated from the following files: