Task #1934
Updated by Yingdi Yu about 10 years ago
Digest may be calculated in two ways: 1) calculate a digest on a determined input; 2) update the digest with dynamic input. For now, ndn-cxx only supports the first style. Given digest may be widely used in NDN applications, it might be useful to support both styles (e.g., the second style is needed by ChronoSync based applications). The second style can be abstracted as a `StatefulDigest` which can be continuously updated until a `finalize` call is made. A pseudo code should look like: StatefulDigest digest; digest.update(input1); digest.update(input2); digest.update(input3); ... ConstBufferPtr result = digest.finalize(); digest.getDigest();