43 : m_certificate(certificate)
44 , m_encryptedKey(encryptedKey.begin(), encryptedKey.end())
48 template<encoding::Tag TAG>
52 size_t totalLength = 0;
58 totalLength += m_certificate.
wireEncode(encoder);
60 totalLength += encoder.prependVarNumber(totalLength);
76 m_wire = buffer.block();
102 m_encryptedKey =
Buffer(it->value(), it->value_size());
Copyright (c) 2011-2015 Regents of the University of California.
void wireDecode(const Block &wire)
Decode from wire.
SafeBag()
Create a new empty SafeBag object.
void parse() const
Parse TLV-VALUE into sub-elements.
Represents a TLV element of the NDN packet format.
element_const_iterator elements_begin() const
Equivalent to elements().begin()
element_const_iterator elements_end() const
Equivalent to elements().end()
void wireDecode(const Block &wire)
Decode the input from wire format.
size_t prependBinaryBlock(EncodingImpl< TAG > &encoder, uint32_t type, span< const uint8_t > value)
Prepend a TLV element containing a sequence of raw bytes.
NDN_CXX_DEFINE_WIRE_ENCODE_INSTANTIATIONS(SafeBag)
A secured container for sensitive information (certificate, private key)
uint32_t type() const noexcept
Return the TLV-TYPE of the Block.
size_t wireEncode(EncodingImpl< TAG > &encoder, bool wantUnsignedPortionOnly=false) const
Prepend wire encoding to encoder.
const Block & wireEncode() const
Encode to wire format.
a concept check for TLV abstraction with .wireEncode method
Represents a Data packet.
a concept check for TLV abstraction with .wireDecode method and constructible from Block ...
General-purpose automatically managed/resized buffer.
EncodingImpl< EncoderTag > EncodingBuffer
represents an error in TLV encoding or decoding
EncodingImpl< EstimatorTag > EncodingEstimator