Portuguese eID Middleware SDK Version: 3.14.0
Loading...
Searching...
No Matches
eIDMW::PTEID_ByteArray Class Reference

#include <eidlib.h>

Public Member Functions

PTEIDSDK_MULTIPASS_API PTEID_ByteArray ()
 
PTEIDSDK_MULTIPASS_API PTEID_ByteArray (const PTEID_ByteArray &bytearray)
 
PTEIDSDK_MULTIPASS_API PTEID_ByteArray (const unsigned char *pucData, unsigned long ulSize)
 
virtual PTEIDSDK_MULTIPASS_API ~PTEID_ByteArray ()
 
PTEIDSDK_MULTIPASS_API void Append (const unsigned char *pucData, unsigned long ulSize)
 
PTEIDSDK_MULTIPASS_API void Append (const PTEID_ByteArray &data)
 
PTEIDSDK_MULTIPASS_API void Clear ()
 
PTEIDSDK_MULTIPASS_API bool Equals (const PTEID_ByteArray &data) const
 
PTEIDSDK_MULTIPASS_API unsigned long Size () const
 
PTEIDSDK_MULTIPASS_API const unsigned char * GetBytes () const
 
const char * GetStringAt (unsigned long ulOffset, unsigned long ulLen) const
 
PTEIDSDK_MULTIPASS_API bool writeToFile (const char *csFilePath)
 
PTEIDSDK_MULTIPASS_API PTEID_ByteArrayoperator= (const PTEID_ByteArray &bytearray)
 
 PTEID_ByteArray (const SDK_Context *context, const CByteArray &impl)
 
PTEID_ByteArrayoperator= (const CByteArray &bytearray)
 
- Public Member Functions inherited from eIDMW::PTEID_Object
virtual PTEIDSDK_API ~PTEID_Object ()=0
 
NOEXPORT_PTEIDSDK void Init (const SDK_Context *context, void *impl)
 
NOEXPORT_PTEIDSDK void Release ()
 

Additional Inherited Members

- Protected Member Functions inherited from eIDMW::PTEID_Object
 PTEID_Object (const SDK_Context *context, void *impl)
 
void addObject (PTEID_Object *impl)
 
void backupObject (unsigned long idx)
 
PTEID_ObjectgetObject (unsigned long idx)
 
PTEID_ObjectgetObject (void *impl)
 
void delObject (unsigned long idx)
 
void delObject (void *impl)
 
void checkContextStillOk () const
 
 PTEID_Object (const PTEID_Object &obj)
 
PTEID_Objectoperator= (const PTEID_Object &obj)
 
- Protected Attributes inherited from eIDMW::PTEID_Object
bool m_delimpl
 
void * m_impl
 
unsigned long m_ulIndexExtAdd
 
std::map< unsigned long, PTEID_Object * > m_objects
 
SDK_Context * m_context
 

Detailed Description

Class used to receive and supply an array of bytes from/to different methods in the SDK.

Memory management note - instances of this class will not own the char arrays that are supplied to it in the constructor or Append() methods as this class will perform copies of the input arrays

Constructor & Destructor Documentation

◆ PTEID_ByteArray() [1/4]

PTEIDSDK_MULTIPASS_API eIDMW::PTEID_ByteArray::PTEID_ByteArray ( )

Default constructor

◆ PTEID_ByteArray() [2/4]

PTEIDSDK_MULTIPASS_API eIDMW::PTEID_ByteArray::PTEID_ByteArray ( const PTEID_ByteArray & bytearray)

Copy constructor

◆ PTEID_ByteArray() [3/4]

PTEIDSDK_MULTIPASS_API eIDMW::PTEID_ByteArray::PTEID_ByteArray ( const unsigned char * pucData,
unsigned long ulSize )

Constructor - initialize a byte array with an array of unsigned char.

Parameters
pucDatais the byte array
ulSizeis the size of the array

◆ ~PTEID_ByteArray()

virtual PTEIDSDK_MULTIPASS_API eIDMW::PTEID_ByteArray::~PTEID_ByteArray ( )
virtual

Destructor

◆ PTEID_ByteArray() [4/4]

eIDMW::PTEID_ByteArray::PTEID_ByteArray ( const SDK_Context * context,
const CByteArray & impl )

For internal use: construct from lower level object

Member Function Documentation

◆ Append() [1/2]

PTEIDSDK_MULTIPASS_API void eIDMW::PTEID_ByteArray::Append ( const PTEID_ByteArray & data)

Append data to the byte array.

◆ Append() [2/2]

PTEIDSDK_MULTIPASS_API void eIDMW::PTEID_ByteArray::Append ( const unsigned char * pucData,
unsigned long ulSize )

Append data to the byte array.

Parameters
pucDatais the byte array
ulSizeis the size of the array

◆ Clear()

PTEIDSDK_MULTIPASS_API void eIDMW::PTEID_ByteArray::Clear ( )

Remove the data from the byte array.

◆ Equals()

PTEIDSDK_MULTIPASS_API bool eIDMW::PTEID_ByteArray::Equals ( const PTEID_ByteArray & data) const

Return true if the content of data is the same as this.

◆ GetBytes()

PTEIDSDK_MULTIPASS_API const unsigned char * eIDMW::PTEID_ByteArray::GetBytes ( ) const

Return the array of bytes in the object. If Size() == 0, then NULL is returned.

◆ GetStringAt()

const char * eIDMW::PTEID_ByteArray::GetStringAt ( unsigned long ulOffset,
unsigned long ulLen ) const

Get a string from buffer at ulOffset position and with ulLen size.

◆ operator=() [1/2]

PTEID_ByteArray & eIDMW::PTEID_ByteArray::operator= ( const CByteArray & bytearray)

For internal use: copy from lower level object

◆ operator=() [2/2]

PTEIDSDK_MULTIPASS_API PTEID_ByteArray & eIDMW::PTEID_ByteArray::operator= ( const PTEID_ByteArray & bytearray)

Copy content of bytearray.

◆ Size()

PTEIDSDK_MULTIPASS_API unsigned long eIDMW::PTEID_ByteArray::Size ( ) const

Return the number of bytes in the array.

◆ writeToFile()

PTEIDSDK_MULTIPASS_API bool eIDMW::PTEID_ByteArray::writeToFile ( const char * csFilePath)

Writing the binary content to a file.