OverSim
CryptoModule.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2009 Institut fuer Telematik, Universitaet Karlsruhe (TH)
3 //
4 // This program is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU General Public License
6 // as published by the Free Software Foundation; either version 2
7 // of the License, or (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 //
18 
25 #ifndef __CRYPTOMODULE_H_
26 #define __CRYPTOMODULE_H_
27 
28 #include <omnetpp.h>
29 #include <cnetcommbuffer.h>
30 
31 class GlobalStatistics;
32 class BaseOverlay;
33 
41 class CryptoModule : public cSimpleModule
42 {
43 
44 public:
45  CryptoModule();
46  virtual ~CryptoModule();
47 
56  virtual void signMessage(BaseRpcMessage *msg);
57 
67  virtual bool verifyMessage(BaseRpcMessage *msg);
68 
69 protected:
70  // see omnetpp.h
71  virtual void initialize();
72 
73  // see omnetpp.h
74  virtual void handleMessage(cMessage *msg);
75 
76  // see omnetpp.h
77  virtual void finish();
78 
79 private:
80  // references to global modules
86  int numSign;
88 };
89 
90 #endif