EmbData Class Reference

#include <EmbData.h>

List of all members.

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< BYTEgetData (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< BYTEData
 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

Enumerator:
EMBED 
EXTRACT 

Enumerator:
READ_MAGIC 
READ_VERSION 
READ_ENCINFO 
READ_NPLAINBITS 
READ_ENCRYPTED 
END 


Constructor & Destructor Documentation

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

void EmbData::addBits ( BitString  addbits  ) 

bool EmbData::checksumOK ( void   )  const

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

Returns:
true iff checksum is ok

bool EmbData::finished ( void   ) 

BitString EmbData::getBitString ( void   ) 

bool EmbData::getChecksum ( void   )  const

int EmbData::getCompression ( void   )  const

std::vector<BYTE> EmbData::getData ( void   )  const [inline]

EncryptionAlgorithm EmbData::getEncAlgo ( void   )  const

EncryptionMode EmbData::getEncMode ( void   )  const

std::string EmbData::getFileName ( void   )  const [inline]

unsigned long EmbData::getNumBitsRequested ( void   ) 

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

void EmbData::setChecksum ( bool  c  ) 

void EmbData::setCompression ( int  c  ) 

void EmbData::setData ( const std::vector< BYTE data  )  [inline]

void EmbData::setEncAlgo ( EncryptionAlgorithm  a  ) 

void EmbData::setEncMode ( EncryptionMode  m  ) 

std::string EmbData::stripDir ( std::string  s  )  [protected]


Member Data Documentation

bool EmbData::Checksum [private]

const unsigned short EmbData::CodeVersion = 0 [static, private]

int EmbData::Compression [private]

unsigned long EmbData::CRC32 [private]

std::vector<BYTE> EmbData::Data [private]

std::string EmbData::FileName [private]

const UWORD32 EmbData::Magic = 0x73688DUL [static, private]

const unsigned int EmbData::MinStegoHeaderSize = 50 [static]

MODE EmbData::Mode [private]

const unsigned int EmbData::NBitsCrc32 = 32 [static, private]

const unsigned int EmbData::NBitsMagic = 24 [static, private]

const unsigned int EmbData::NBitsNPlainBits = 32 [static, private]

const unsigned int EmbData::NBitsNUncompressedBits = 32 [static, private]

unsigned long EmbData::NPlainBits [private]

unsigned long EmbData::NumBitsNeeded [private]

unsigned long EmbData::NumBitsRequested [private]

std::string EmbData::Passphrase [private]

STATE EmbData::State [private]

unsigned short EmbData::Version [private]


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

Generated on Mon Aug 17 10:56:09 2009 for steghide by  doxygen 1.5.9