CvrStgFile.h
Go to the documentation of this file.
/*
* steghide 0.5.1 - a steganography program
* Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
#ifndef SH_CVRSTGFILE_H
#define SH_CVRSTGFILE_H
#include <list>
#include <string>
#include <map>
#include "BinaryIO.h"
#include "CvrStgObject.h"
class Graph ;
class Matching ;
class MatchingAlgorithm ;
class SampleValue ;
class SampleValueAdjacencyList ;
class CvrStgFile : public CvrStgObject {
public:
static CvrStgFile *readFile (const std::string& fn) ;
class Property : private std::pair<std::string,std::string> {
public:
Property (std::string key, std::string value)
: std::pair<std::string,std::string> (key, value) {} ;
std::string getKey (void) const
{ return first ; } ;
std::string getValue (void) const
{ return second ; } ;
} ;
CvrStgFile (void) ;
virtual ~CvrStgFile (void) ;
virtual void read (BinaryIO *io) ;
virtual void write (void) ;
void transform (const std::string& fn) ;
virtual std::list<Property> getProperties (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
{ return getBinIO()->getName() ; } ;
bool is_std (void) const
{ return getBinIO()->is_std() ; } ;
unsigned long getCapacity (void) const ;
std::string getHRCapacity (void) const ;
unsigned short getSamplesPerVertex (void) const
{ return SamplesPerVertex ; } ;
UWORD32 getRadius (void) const
{ return Radius ; } ;
EmbValue getEmbValueModulus (void) const
{ return EmbValueModulus ; } ;
virtual EmbValue getEmbeddedValue (const SamplePos pos) const ;
#ifdef DEBUG
virtual std::map<SampleKey,unsigned long>* getFrequencies (void) ;
virtual void printFrequencies (const std::map<SampleKey,unsigned long>& freqs) ;
#endif
protected:
void setSamplesPerVertex (unsigned short spv)
{ SamplesPerVertex = spv ; } ;
void setRadius (UWORD32 r) ;
void setEmbValueModulus (EmbValue m)
{ EmbValueModulus = m ; } ;
void setBinIO (BinaryIO* io)
{ BinIO = io ; } ;
BinaryIO* getBinIO (void) const
{ return BinIO ; } ;
private:
enum FILEFORMAT { UNKNOWN, BMP, WAV, AU, JPEG } ;
static FILEFORMAT guessff (BinaryIO *io) ;
BinaryIO* BinIO ;
unsigned short SamplesPerVertex ;
UWORD32 Radius ;
EmbValue EmbValueModulus ;
} ;
#endif /* ndef SH_CVRSTGFILE_H */
BinaryIO.h
CvrStgObject.h
BinaryIO
provides methods for file i/o as needed by the rest of steghide
Definition BinaryIO.h:33
BinaryIO::is_std
bool is_std(void) const
Definition BinaryIO.h:65
BinaryIO::getName
const std::string & getName(void) const
Definition BinaryIO.h:53
CvrStgFile::Property::Property
Property(std::string key, std::string value)
Definition CvrStgFile.h:56
CvrStgFile::Property::getValue
std::string getValue(void) const
Definition CvrStgFile.h:62
CvrStgFile::Property::getKey
std::string getKey(void) const
Definition CvrStgFile.h:59
CvrStgFile::setBinIO
void setBinIO(BinaryIO *io)
Definition CvrStgFile.h:168
CvrStgFile::getBinIO
BinaryIO * getBinIO(void) const
Definition CvrStgFile.h:171
CvrStgFile::getHRCapacity
std::string getHRCapacity(void) const
Definition CvrStgFile.cc:126
CvrStgFile::calcSVAdjacencyLists
virtual std::vector< SampleValueAdjacencyList * > calcSVAdjacencyLists(const std::vector< SampleValue * > &svs) const
Definition CvrStgFile.cc:79
CvrStgFile::EmbValueModulus
EmbValue EmbValueModulus
Definition CvrStgFile.h:186
CvrStgFile::BinIO
BinaryIO * BinIO
Definition CvrStgFile.h:182
CvrStgFile::getSamplesPerVertex
unsigned short getSamplesPerVertex(void) const
Definition CvrStgFile.h:120
CvrStgFile::readFile
static CvrStgFile * readFile(const std::string &fn)
Definition CvrStgFile.cc:186
CvrStgFile::read
virtual void read(BinaryIO *io)
Definition CvrStgFile.cc:63
CvrStgFile::setEmbValueModulus
void setEmbValueModulus(EmbValue m)
Definition CvrStgFile.h:165
CvrStgFile::is_std
bool is_std(void) const
Definition CvrStgFile.h:103
CvrStgFile::getName
const std::string & getName(void) const
Definition CvrStgFile.h:100
CvrStgFile::setRadius
void setRadius(UWORD32 r)
Definition CvrStgFile.cc:53
CvrStgFile::getMatchingAlgorithms
virtual std::vector< MatchingAlgorithm * > getMatchingAlgorithms(Graph *g, Matching *m) const
Definition CvrStgFile.cc:103
CvrStgFile::getEmbValueModulus
EmbValue getEmbValueModulus(void) const
Definition CvrStgFile.h:130
CvrStgFile::transform
void transform(const std::string &fn)
Definition CvrStgFile.cc:72
CvrStgFile::getCapacity
unsigned long getCapacity(void) const
Definition CvrStgFile.cc:119
CvrStgFile::setSamplesPerVertex
void setSamplesPerVertex(unsigned short spv)
Definition CvrStgFile.h:159
CvrStgFile::guessff
static FILEFORMAT guessff(BinaryIO *io)
Definition CvrStgFile.cc:155
CvrStgFile::CvrStgFile
CvrStgFile(void)
Definition CvrStgFile.cc:40
CvrStgFile::getEmbeddedValue
virtual EmbValue getEmbeddedValue(const SamplePos pos) const
Definition CvrStgFile.cc:111
CvrStgFile::~CvrStgFile
virtual ~CvrStgFile(void)
Definition CvrStgFile.cc:46
CvrStgFile::SamplesPerVertex
unsigned short SamplesPerVertex
Definition CvrStgFile.h:184
CvrStgFile::getRadius
UWORD32 getRadius(void) const
Definition CvrStgFile.h:125
CvrStgFile::Radius
UWORD32 Radius
Definition CvrStgFile.h:185
CvrStgFile::FILEFORMAT
FILEFORMAT
Definition CvrStgFile.h:175
CvrStgFile::UNKNOWN
@ UNKNOWN
Definition CvrStgFile.h:175
CvrStgFile::AU
@ AU
Definition CvrStgFile.h:175
CvrStgFile::JPEG
@ JPEG
Definition CvrStgFile.h:175
CvrStgFile::BMP
@ BMP
Definition CvrStgFile.h:175
CvrStgFile::WAV
@ WAV
Definition CvrStgFile.h:175
CvrStgFile::getProperties
virtual std::list< Property > getProperties(void) const =0
CvrStgFile::write
virtual void write(void)
Definition CvrStgFile.cc:68
CvrStgObject
an object that can hold embedded data
Definition CvrStgObject.h:40
Graph
a graph constructed from a cover file and a message to be embedded
Definition Graph.h:51
MatchingAlgorithm
Definition MatchingAlgorithm.h:27
Matching
represent a matching on a graph
Definition Matching.h:41
SampleValueAdjacencyList
an adjacency list-like data structur for sample values
Definition SampleValueAdjacencyList.h:33
SampleValue
the value of a sample in a CvrStgFile
Definition SampleValue.h:61
SamplePos
UWORD32 SamplePos
Definition common.h:67
UWORD32
unsigned long UWORD32
Definition common.h:45
EmbValue
BYTE EmbValue
Definition common.h:66