Kinetis Bootloader Host  2.0.0
Host Tools for Kinetis devices
elftosb::EncoreBootImage::CipherBlockGenerator Class Reference

Base class for objects that produce cipher blocks. More...

#include <EncoreBootImage.h>

+ Inheritance diagram for elftosb::EncoreBootImage::CipherBlockGenerator:

Public Member Functions

virtual void debugPrint () const
 Print out a string representation of the object.
 
Cipher blocks
virtual unsigned getBlockCount () const
 Returns the total number of cipher blocks. More...
 
virtual unsigned getBlocks (unsigned offset, unsigned maxCount, cipher_block_t *data)
 Returns the contents of up to maxCount cipher blocks. More...
 

Detailed Description

Base class for objects that produce cipher blocks.

Member Function Documentation

virtual unsigned elftosb::EncoreBootImage::CipherBlockGenerator::getBlockCount ( ) const
inlinevirtual

Returns the total number of cipher blocks.

The default implementation returns 0, indicating that no blocks are available.

Reimplemented in elftosb::EncoreBootImage::DataSection, elftosb::EncoreBootImage::BootSection, and elftosb::EncoreBootImage::BootCommand.

virtual unsigned elftosb::EncoreBootImage::CipherBlockGenerator::getBlocks ( unsigned  offset,
unsigned  maxCount,
cipher_block_t *  data 
)
inlinevirtual

Returns the contents of up to maxCount cipher blocks.

Up to maxCount cipher blocks are copied into the buffer pointed to by the data argument. This is only a request for maxCount blocks, the subclass implementation of this method is free to return any number of blocks from 0 up to maxCount. A return value of 0 indicates that no more blocks are available. The index of the first block to copy is held in the offset argument.

Parameters
offsetStarting block number to copy. Zero means the first available block.
maxCountUp to this number of blocks may be copied into data. Must be 1 or greater.
dataBuffer for outgoing cipher blocks. Must have enough room to hold maxCount blocks.
Returns
The number of cipher blocks copied into data.
Return values
0No more blocks are available and nothing was written to data.

Reimplemented in elftosb::EncoreBootImage::DataSection, elftosb::EncoreBootImage::BootSection, and elftosb::EncoreBootImage::BootCommand.


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