Public Member Functions | Protected Member Functions | List of all members
ndn::DerNode::DerByteString Class Reference

A DerByteString extends DerNode to handle byte strings. More...

#include <der-node.hpp>

Inheritance diagram for ndn::DerNode::DerByteString:
ndn::DerNode ndn::DerNode::DerOctetString ndn::DerNode::DerPrintableString

Public Member Functions

virtual Blob toVal ()
 Override to return just the byte string. More...
 
- Public Member Functions inherited from ndn::DerNode
virtual size_t getSize ()
 
virtual Blob encode ()
 Get the raw data encoding for this node. More...
 
Blob getPayload ()
 Get a copy of the payload bytes. More...
 
virtual const std::vector< ptr_lib::shared_ptr< DerNode > > & getChildren ()
 If this object is a DerSequence, get the children of this node. More...
 

Protected Member Functions

 DerByteString (const uint8_t *inputData, size_t inputDataLength, DerNodeType nodeType)
 Create a DerByteString with the given inputData and nodeType. More...
 
- Protected Member Functions inherited from ndn::DerNode
 DerNode (DerNodeType nodeType)
 Create a generic DER node with the given nodeType. More...
 
void encodeHeader (size_t size)
 Encode the given size and update the header. More...
 
size_t decodeHeader (const uint8_t *inputBuf, size_t startIdx)
 Extract the header from an input buffer and return the size. More...
 
virtual void decode (const uint8_t *inputBuf, size_t startIdx)
 Decode and store the data from an input buffer. More...
 
void payloadAppend (const uint8_t *value, size_t valueLength)
 Call payload_.copy to copy value into payload_ at payloadPosition_. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ndn::DerNode
static ptr_lib::shared_ptr< DerNodeparse (const uint8_t *inputBuf, size_t startIdx=0)
 Parse the data from the input buffer recursively and return the root as an object of a subclass of DerNode. More...
 
static DerNode::DerSequencegetSequence (const std::vector< ptr_lib::shared_ptr< DerNode > > &children, size_t index)
 Check that index is in bounds for the children list, cast children[index] to DerSequence and return it. More...
 
- Protected Attributes inherited from ndn::DerNode
DerStructureparent_
 
DerNodeType nodeType_
 
std::vector< uint8_t > header_
 
DynamicUInt8Vector payload_
 
size_t payloadPosition_
 

Detailed Description

A DerByteString extends DerNode to handle byte strings.

Constructor & Destructor Documentation

ndn::DerNode::DerByteString::DerByteString ( const uint8_t *  inputData,
size_t  inputDataLength,
DerNodeType  nodeType 
)
inlineprotected

Create a DerByteString with the given inputData and nodeType.

This is a protected constructor used by one of the public subclasses such as DerOctetString or DerPrintableString.

Parameters
inputDataAn input buffer containing the string to encode.
inputDataLengthThe length of inputData.
nodeTypeThe specific DER node type.

Member Function Documentation

Blob ndn::DerNode::DerByteString::toVal ( )
virtual

Override to return just the byte string.

Returns
The byte string as a copy of the payload ByteBuffer.

Reimplemented from ndn::DerNode.


The documentation for this class was generated from the following files: