steghide 0.5.1
MHashPP.h
Go to the documentation of this file.
1/*
2 * steghide 0.5.1 - a steganography program
3 * Copyright (C) 1999-2003 Stefan Hetzl <shetzl@chello.at>
4 *
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License
7 * as published by the Free Software Foundation; either version 2
8 * of the License, or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 *
19 */
20
21#ifndef SH_MHASHPP_H
22#define SH_MHASHPP_H
23
24#include <mhash.h>
25
26#include "common.h"
27
28class BitString ;
29
30class MHashPP {
31 public:
32 enum Command { endhash } ;
33
34 MHashPP (void) ;
35 MHashPP (hashid a) ;
36
37 void init (hashid a) ;
38
39 const std::vector<BYTE>& end (void) ;
40
45 MHashPP& operator<< (std::string v) ;
46
52
58
64
69 BitString getHashBits (void) ;
70
71 const std::vector<BYTE>& getHashBytes (void) ;
72
77 unsigned int getHashSize (void) ;
78
79 private:
81 bool hashing ;
82 MHASH HashD ;
83
86 std::vector<BYTE> HashBytes ;
87
88 std::string getAlgorithmName (void) ;
89 static std::string getAlgorithmName (hashid id) ;
90} ;
91
92#endif // ndef SH_MHASHPP_H
a string of bits
Definition: BitString.h:42
Definition: MHashPP.h:30
bool HashBytesValid
true iff HashBytes contains a valid hash value
Definition: MHashPP.h:85
bool hashing
true iff HashD contains a legal hash descriptor and data can be passed via <<
Definition: MHashPP.h:81
const std::vector< BYTE > & getHashBytes(void)
Definition: MHashPP.cc:141
const std::vector< BYTE > & end(void)
Definition: MHashPP.cc:51
MHashPP(void)
Definition: MHashPP.cc:31
unsigned int getHashSize(void)
Definition: MHashPP.cc:68
MHASH HashD
Definition: MHashPP.h:82
std::vector< BYTE > HashBytes
Definition: MHashPP.h:86
std::string getAlgorithmName(void)
Definition: MHashPP.cc:115
Command
Definition: MHashPP.h:32
@ endhash
Definition: MHashPP.h:32
BitString getHashBits(void)
Definition: MHashPP.cc:135
MHashPP & operator<<(std::string v)
Definition: MHashPP.cc:74
void init(hashid a)
Definition: MHashPP.cc:42
unsigned char BYTE
Definition: common.h:47