encoding: Extending Block and EncodingBuffer interfaces
Now it is possible to use constructors to create Block from
EncodingBuffer and EncodingBuffer from Block.
Block->EncodingBuffer conversion is potentially dangerous and should be
used only in exceptional cases, such as Data packet encoding: to encode
the signed part first and then extend signed part with signature and
other related fields.
Change-Id: I5a13bf0c196ecd0d45dfa14c4cb6f4a9f612420c
diff --git a/src/encoding/block.hpp b/src/encoding/block.hpp
index a2f19be..895df49 100644
--- a/src/encoding/block.hpp
+++ b/src/encoding/block.hpp
@@ -39,6 +39,12 @@
Block();
/**
+ * @brief Create block based on EncodingBuffer object
+ */
+ explicit
+ Block(const EncodingBuffer& buffer);
+
+ /**
* @brief A helper version of a constructor to create Block from the raw buffer (type and value-length parsing)
*/
Block(const ConstBufferPtr &buffer);