encoding: Improving structure and documentation of block helpers
This commit add several new helpers to simplify operations with
std::string:
- prependStringBlock
- makeStringBlock
- readString
The following functions are deprecated and their replacements:
- nonNegativeIntegerBlock (use makeNonNegativeIntegerBlock)
- prependBooleanBlock (use prependEmptyBlock)
- booleanBlock (use makeEmptyBlock)
- dataBlock (use makeBinaryBlock)
- nestedBlock (use makeNestedBlock)
Change-Id: Ic595ae64fc9c80c2c04e5fde1d8812e8b9debd60
Refs: #2951
diff --git a/tests/unit-tests/key-locator.t.cpp b/tests/unit-tests/key-locator.t.cpp
index 671a362..94eb5a2 100644
--- a/tests/unit-tests/key-locator.t.cpp
+++ b/tests/unit-tests/key-locator.t.cpp
@@ -92,7 +92,7 @@
{
char digestOctets[] = "\xDD\xDD\xDD\xDD\xDD\xDD\xDD\xDD";
ConstBufferPtr digestBuffer = make_shared<Buffer>(digestOctets, 8);
- Block expectedDigestBlock = dataBlock(tlv::KeyDigest, digestOctets, 8);
+ Block expectedDigestBlock = makeBinaryBlock(tlv::KeyDigest, digestOctets, 8);
KeyLocator a;
a.setKeyDigest(digestBuffer);