38 : m_certificate(certificate)
39 , m_encryptedKey(encryptedKey.begin(), encryptedKey.end())
43 template<encoding::Tag TAG>
47 size_t totalLength = 0;
53 totalLength += m_certificate.
wireEncode(encoder);
55 totalLength += encoder.prependVarNumber(totalLength);
71 m_wire = buffer.block();
97 m_encryptedKey =
Buffer(it->value(), it->value_size());
Represents a TLV element of the NDN packet format.
element_const_iterator elements_begin() const noexcept
Equivalent to elements().begin().
element_const_iterator elements_end() const noexcept
Equivalent to elements().end().
uint32_t type() const noexcept
Return the TLV-TYPE of the Block.
void parse() const
Parse TLV-VALUE into sub-elements.
General-purpose automatically managed/resized buffer.
Represents a Data packet.
void wireDecode(const Block &wire)
Decode from wire.
size_t wireEncode(EncodingImpl< TAG > &encoder, bool wantUnsignedPortionOnly=false) const
Prepend wire encoding to encoder.
A secured container for sensitive information (certificate, private key)
void wireDecode(const Block &wire)
Decode the input from wire format.
SafeBag()
Create a new empty SafeBag object.
const Block & wireEncode() const
Encode to wire format.
Represents an error in TLV encoding or decoding.
#define NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(ClassName)
EncodingImpl< EstimatorTag > EncodingEstimator
size_t prependBinaryBlock(EncodingImpl< TAG > &encoder, uint32_t type, span< const uint8_t > value)
Prepend a TLV element containing a sequence of raw bytes.
EncodingImpl< EncoderTag > EncodingBuffer
Contains the ndn-cxx security framework.