EmbData Class Reference

`#include <EmbData.h>`

## Public Types

enum | MODE { EMBED , EXTRACT }
enum | STATE { READ_MAGIC , READ_VERSION , READ_ENCINFO , READ_NPLAINBITS , READ_ENCRYPTED , END }

## Public Member Functions

| EmbData (MODE m, std::string pp, std::string fn="")
BitString | getBitString (void)
bool | finished (void)
unsigned long | getNumBitsRequested (void)
void | addBits (BitString addbits)
void | setEncAlgo (EncryptionAlgorithm a)
EncryptionAlgorithm | getEncAlgo (void) const
void | setEncMode (EncryptionMode m)
EncryptionMode | getEncMode (void) const
void | setCompression (int c)
int | getCompression (void) const
void | setChecksum (bool c)
bool | getChecksum (void) const
bool | checksumOK (void) const
void | setData (const std::vector< BYTE > data)
std::vector< BYTE > | getData (void) const
std::string | getFileName (void) const

## Static Public Attributes

static const unsigned int | MinStegoHeaderSize = 50
| the minimum size of the part of the generatred BitString that is not the data

## Protected Member Functions

std::string | stripDir (std::string s)

## Private Attributes

MODE | Mode
STATE | State
unsigned long | NPlainBits
unsigned long | NumBitsRequested
| the number of bits that the caller must at least supply to addBits
unsigned long | NumBitsNeeded
| exactly the number of bits that the next step will consume from Reservoir and addBits together
BitString | Reservoir
std::string | Passphrase
unsigned short | Version
| version read from input bitstring
EncryptionAlgorithm | EncAlgo
EncryptionMode | EncMode
int | Compression
| compression level: 0(none),1(best speed),...,9(best compression)
bool | Checksum
| will a checksum be embedded ?
unsigned long | CRC32
| the checksum
std::string | FileName
std::vector< BYTE > | Data
| contains the actual message to be embedded

## Static Private Attributes

static const unsigned int | NBitsNPlainBits = 32
| number of bits used to code the number of plain bits
static const unsigned int | NBitsNUncompressedBits = 32
| number of bits used to code the number of uncompressed bits
static const unsigned int | NBitsCrc32 = 32
| size of a crc32 checksum in bits
static const unsigned short | CodeVersion = 0
| version of this steghide embedding (stego compatibility of EmbData)
static const UWORD32 | Magic = 0x73688DUL
| steghide magic to recognize embedded data (the string "shm")
static const unsigned int | NBitsMagic = 24
| size (in bits of Magic)

## Member Enumeration Documentation

## MODE

enum EmbData::MODE

Enumerator
EMBED |
EXTRACT |

## STATE

enum EmbData::STATE

Enumerator
READ_MAGIC |
READ_VERSION |
READ_ENCINFO |
READ_NPLAINBITS |
READ_ENCRYPTED |
END |

## Constructor & Destructor Documentation

## EmbData()

EmbData::EmbData | ( | MODE | m,
|  | std::string | pp,
|  | std::string | fn = "" )

construct a new EmbData object

Parameters

  m | the mode (EMBED or EXTRACT)
  pp | the passphrase
  fn | the filename (only need for mode EMBED)

## Member Function Documentation

## addBits()

void EmbData::addBits | ( | BitString | addbits | ) |

## checksumOK()

bool EmbData::checksumOK | ( | void |  | ) | const

check if crc32 checksum is ok (needs filled Data and CRC32 fields)

Returns
  true iff checksum is ok

## finished()

bool EmbData::finished | ( | void |  | ) |

## getBitString()

BitString EmbData::getBitString | ( | void |  | ) |

## getChecksum()

bool EmbData::getChecksum | ( | void |  | ) | const

## getCompression()

int EmbData::getCompression | ( | void |  | ) | const

## getData()

std::vector< BYTE > EmbData::getData | ( | void |  | ) | const

inline

## getEncAlgo()

EncryptionAlgorithm EmbData::getEncAlgo | ( | void |  | ) | const

## getEncMode()

EncryptionMode EmbData::getEncMode | ( | void |  | ) | const

## getFileName()

std::string EmbData::getFileName | ( | void |  | ) | const

inline

## getNumBitsRequested()

unsigned long EmbData::getNumBitsRequested | ( | void |  | ) |

get the minimum length of the BitString that is to be passed to addBits

## setChecksum()

void EmbData::setChecksum | ( | bool | c | ) |

## setCompression()

void EmbData::setCompression | ( | int | c | ) |

## setData()

void EmbData::setData | ( | const std::vector< BYTE > | data | ) |

inline

## setEncAlgo()

void EmbData::setEncAlgo | ( | EncryptionAlgorithm | a | ) |

## setEncMode()

void EmbData::setEncMode | ( | EncryptionMode | m | ) |

## stripDir()

std::string EmbData::stripDir | ( | std::string | s | ) |

protected

## Member Data Documentation

## Checksum

bool EmbData::Checksum

private

## CodeVersion

const unsigned short EmbData::CodeVersion = 0

static private

## Compression

int EmbData::Compression

private

## CRC32

unsigned long EmbData::CRC32

private

## Data

std::vector<BYTE> EmbData::Data

private

## EncAlgo

EncryptionAlgorithm EmbData::EncAlgo

private

## EncMode

EncryptionMode EmbData::EncMode

private

## FileName

std::string EmbData::FileName

private

## Magic

const UWORD32 EmbData::Magic = 0x73688DUL

static private

## MinStegoHeaderSize

const unsigned int EmbData::MinStegoHeaderSize = 50

static

## Mode

MODE EmbData::Mode

private

## NBitsCrc32

const unsigned int EmbData::NBitsCrc32 = 32

static private

## NBitsMagic

const unsigned int EmbData::NBitsMagic = 24

static private

## NBitsNPlainBits

const unsigned int EmbData::NBitsNPlainBits = 32

static private

## NBitsNUncompressedBits

const unsigned int EmbData::NBitsNUncompressedBits = 32

static private

## NPlainBits

unsigned long EmbData::NPlainBits

private

## NumBitsNeeded

unsigned long EmbData::NumBitsNeeded

private

## NumBitsRequested

unsigned long EmbData::NumBitsRequested

private

## Passphrase

std::string EmbData::Passphrase

private

## Reservoir

BitString EmbData::Reservoir

private

## State

STATE EmbData::State

private

## Version

unsigned short EmbData::Version

private

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

- EmbData.h
- EmbData.cc