MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLS63EncryptedData Class Reference

Detailed Description

This class represents a block of encrypted data..

Instances of this class will be used in the following S63 processes:

  • When an ENC cell is first ingested during the S63 Media Ingest process, two instances of this class will be provided to the OEM by MapLink. The first instance will contain the encrypted TMF data for that cell while the second will hold intermediary data that will be required when ingesting cell updates in future media ingest runs. The OEM should store both instances of this class in their secure data store, using the save functions the class exposes.
  • When, during a media ingest process, updates need to be applied to a previously ingested ENC cell, the intermediary data provided to the OEM during the initial cell ingest (or a subsequent update) should be loaded, by the OEM, from their secure data store and returned to MapLink. Once the update or updates have been applied, MapLink will return back to the OEM two updated instances of this class (encrypted TMF and intermediary data) for storage by the OEM.
  • During the display and decryption process, MapLink will request from the OEM the encrypted TMF data for each of the cells that are to be displayed. The intermediary data provided to the OEM during the media ingest process will not be required at display time.

Public Member Functions

void freeBuffer (unsigned char *buffer) const
 
bool loadData (TSLifstream &stream)
 
bool loadDataFromBuffer (const unsigned char *data, int dataLength)
 
bool saveData (TSLofstream &stream) const
 
unsigned char * saveDataToBuffer (int &dataLength) const
 

Member Function Documentation

◆ freeBuffer()

void TSLS63EncryptedData::freeBuffer ( unsigned char * buffer) const

Deletes the buffer returned from 'saveDataToBuffer'.

This method must be used to delete the buffer after a call to 'saveDataTo Buffer' to ensure that the allocating library is also the deallocating library. If this does not happen then the memory may be leaked.

Parameters
bufferBuffer to be deleted, returned from saveDataToBuffer.

◆ loadData()

bool TSLS63EncryptedData::loadData ( TSLifstream & stream)

Loads an encrypted data block from the provided TSLifstream.

Parameters
streamStream to use to load the data.
Returns
true if the data was successfully loaded, otherwise false.
Note
This method does not validate that the loaded data is correct, simply that it was loaded successfully

◆ loadDataFromBuffer()

bool TSLS63EncryptedData::loadDataFromBuffer ( const unsigned char * data,
int dataLength )

Loads encrypted data from the provided buffer.

This method allows you to load encrypted data from a buffer. This will overwrite any existing data in the object. The data passed in must be an encrypted data buffer such as is generated by the saveDataToBuffer() method. The user retains ownership of the buffer passed in.

Parameters
dataA pointer to the data to load
dataLengthThe size of the buffer passed in.
Returns
true if the data was successfully loaded, otherwise false.
Note
This method does not validate that the loaded data is correct, simply that it was loaded successfully

◆ saveData()

bool TSLS63EncryptedData::saveData ( TSLofstream & stream) const

Saves the encrypted data to the provided TSLofstream.

Parameters
streamStream to use to save the cell.
Returns
true if the cell was successfully saved, otherwise false.

◆ saveDataToBuffer()

unsigned char * TSLS63EncryptedData::saveDataToBuffer ( int & dataLength) const

Creates a buffer and propulates it with the encrypted data contained by this class.

It is your responsibility to free the buffer, using the freeBuffer function, after you are finished with it.

Parameters
dataLengthStorage for the size of the data that was saved in bytes.
Returns
a user owned buffer if successful, NULL otherwise.