steghide  0.5.1
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Static Private Member Functions | Private Attributes | List of all members
CvrStgFile Class Referenceabstract

a cover-/stego-file More...

#include <CvrStgFile.h>

Inheritance diagram for CvrStgFile:
CvrStgObject AuFile BmpFile DummyFile WavFile

Classes

class  Property
 

Public Member Functions

 CvrStgFile (void)
 
virtual ~CvrStgFile (void)
 
virtual void read (BinaryIO *io)
 
virtual void write (void)
 
void transform (const std::string &fn)
 
virtual std::list< PropertygetProperties (void) const =0
 
virtual std::vector< SampleValueAdjacencyList * > calcSVAdjacencyLists (const std::vector< SampleValue * > &svs) const
 
virtual std::vector< MatchingAlgorithm * > getMatchingAlgorithms (Graph *g, Matching *m) const
 
const std::string & getName (void) const
 
bool is_std (void) const
 
unsigned long getCapacity (void) const
 
std::string getHRCapacity (void) const
 
unsigned short getSamplesPerVertex (void) const
 
UWORD32 getRadius (void) const
 
EmbValue getEmbValueModulus (void) const
 
virtual EmbValue getEmbeddedValue (const SamplePos pos) const
 
- Public Member Functions inherited from CvrStgObject
virtual unsigned long getNumSamples (void) const =0
 
virtual SampleValuegetSampleValue (const SamplePos pos) const =0
 
virtual void replaceSample (const SamplePos pos, const SampleValue *s)=0
 

Static Public Member Functions

static CvrStgFilereadFile (const std::string &fn)
 

Protected Member Functions

void setSamplesPerVertex (unsigned short spv)
 
void setRadius (UWORD32 r)
 
void setEmbValueModulus (EmbValue m)
 
void setBinIO (BinaryIO *io)
 
BinaryIOgetBinIO (void) const
 

Private Types

enum  FILEFORMAT {
  UNKNOWN, BMP, WAV, AU,
  JPEG
}
 

Static Private Member Functions

static FILEFORMAT guessff (BinaryIO *io)
 

Private Attributes

BinaryIOBinIO
 
unsigned short SamplesPerVertex
 
UWORD32 Radius
 
EmbValue EmbValueModulus
 

Detailed Description

file-format specific constants are handled as follows: CvrStgFile contains a protected set-function (e.g. setSamplesPerVertex), a public get-function (e.g. getSamplesPerVertex() const) and a private variable. The public get function does nothing else than returning the private variable, which must be set as soon as possible (if it is not set, it will contain a null value set in CvrStgFile::CvrStgFile).

Member Enumeration Documentation

enum CvrStgFile::FILEFORMAT
private
Enumerator
UNKNOWN 
BMP 
WAV 
AU 
JPEG 

Constructor & Destructor Documentation

CvrStgFile::CvrStgFile ( void  )
CvrStgFile::~CvrStgFile ( void  )
virtual

Member Function Documentation

std::vector< SampleValueAdjacencyList * > CvrStgFile::calcSVAdjacencyLists ( const std::vector< SampleValue * > &  svs) const
virtual

calculate a vector a SampleValueAdjacencyLists

Parameters
svsa vector of unique(!) sample values where svs[i]->getLabel() == i holds for all i
Returns
a vector of SampleValueAdjacencyLists where retval[i] only contains sample values with getEmbValue() == i

Every row in the adjacency lists must be sorted in the following order: The first sample value has the least distance to the source sample value, the last has the largest distance. If two sample values in one row have the same distance to the source sample value, the order does not matter.

May be overridden in derived class to provide a faster version.

Reimplemented in WavFile, and BmpFile.

BinaryIO* CvrStgFile::getBinIO ( void  ) const
inlineprotected
unsigned long CvrStgFile::getCapacity ( void  ) const

get the capacity of this cvrstgfile

Returns
the capacity in bytes
EmbValue CvrStgFile::getEmbeddedValue ( const SamplePos  pos) const
virtual

get the value that is embedded in the Sample pos

Parameters
posthe position of the sample
Returns
the value that is embedded in the sample at the given sample position

This is equivalent to getSample(pos)->getEmbeddedValue() and is implemented here like this.

May be overwritten by derived class to provide a faster version.

EmbValue CvrStgFile::getEmbValueModulus ( void  ) const
inline

values that are embedded in samples will be in 0...Modulus-1 (this is a file-format specific constant)

std::string CvrStgFile::getHRCapacity ( void  ) const

get the capacity as a human-readable string

std::vector< MatchingAlgorithm * > CvrStgFile::getMatchingAlgorithms ( Graph g,
Matching m 
) const
virtual

get recommended list of matching algorithms

Parameters
man empty matching - will be used in construction of MatchingAlgorithm objects

The MatchingAlgorithm objects returned by this function should be deleted by the caller if they are no longer needed.

Reimplemented in WavFile, AuFile, and BmpFile.

const std::string& CvrStgFile::getName ( void  ) const
inline

get the name of this cvrstgfile

virtual std::list<Property> CvrStgFile::getProperties ( void  ) const
pure virtual

Implemented in DummyFile, AuFile, WavFile, and BmpFile.

UWORD32 CvrStgFile::getRadius ( void  ) const
inline

get the neighbourhood radius (this is a file-format specific constant)

unsigned short CvrStgFile::getSamplesPerVertex ( void  ) const
inline

get the number of samples per vertex (this is a file-format specific constant)

CvrStgFile::FILEFORMAT CvrStgFile::guessff ( BinaryIO io)
staticprivate

guesses the file format by looking at the first few bytes

bool CvrStgFile::is_std ( void  ) const
inline
void CvrStgFile::read ( BinaryIO io)
virtual

Reimplemented in AuFile, WavFile, and BmpFile.

CvrStgFile * CvrStgFile::readFile ( const std::string &  fn)
static

this function reads the file with name fn and returns a *File object of the correct type casted to CvrStgFile.

void CvrStgFile::setBinIO ( BinaryIO io)
inlineprotected
void CvrStgFile::setEmbValueModulus ( EmbValue  m)
inlineprotected
void CvrStgFile::setRadius ( UWORD32  r)
protected

set Radius to r unless Args.Radius is set (set Radius to Args.Radius.getValue() then)

void CvrStgFile::setSamplesPerVertex ( unsigned short  spv)
inlineprotected
void CvrStgFile::transform ( const std::string &  fn)
void CvrStgFile::write ( void  )
virtual

Reimplemented in AuFile, WavFile, and BmpFile.

Member Data Documentation

BinaryIO* CvrStgFile::BinIO
private
EmbValue CvrStgFile::EmbValueModulus
private
UWORD32 CvrStgFile::Radius
private
unsigned short CvrStgFile::SamplesPerVertex
private

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