summaryrefslogtreecommitdiff
path: root/docs/tutorials/015/Crypt.h
blob: 6de997fa4a9fe96d6390d7065c8e36b7853dc858 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// $Id$

#ifndef CRYPT_H
#define CRYPT_h

#include "Protocol_Task.h"

/* An interface (adaptor) between your favorite encryption method and
   an ACE_Stream.
*/
class Crypt : public Protocol_Task
{
public:

  typedef Protocol_Task inherited;

  Crypt (void);

  ~Crypt (void);

protected:

  // Moving downstream will encrypt the data
  int send (ACE_Message_Block *message,
            ACE_Time_Value *timeout);

  // And moving upstream will decrypt it.
  int recv (ACE_Message_Block *message,
            ACE_Time_Value *timeout);
};

#endif /* CRYPT_H */