~ubuntu-branches/debian/sid/botan/sid

« back to all changes in this revision

Viewing changes to include/pk_filts.h

  • Committer: Package Import Robot
  • Author(s): Laszlo Boszormenyi (GCS)
  • Date: 2018-03-01 22:23:25 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20180301222325-7p7vc45gu3hta34d
Tags: 2.4.0-2
* Don't remove .doctrees from the manual if it doesn't exist.
* Don't specify parallel to debhelper.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*************************************************
2
 
* PK Filters Header File                         *
3
 
* (C) 1999-2007 The Botan Project                *
4
 
*************************************************/
5
 
 
6
 
#ifndef BOTAN_PK_FILTERS_H__
7
 
#define BOTAN_PK_FILTERS_H__
8
 
 
9
 
#include <botan/filter.h>
10
 
#include <botan/pubkey.h>
11
 
 
12
 
namespace Botan {
13
 
 
14
 
/*************************************************
15
 
* PK_Encryptor Filter                            *
16
 
*************************************************/
17
 
class PK_Encryptor_Filter : public Filter
18
 
   {
19
 
   public:
20
 
      void write(const byte[], u32bit);
21
 
      void end_msg();
22
 
      PK_Encryptor_Filter(PK_Encryptor* c) : cipher(c) {}
23
 
      ~PK_Encryptor_Filter() { delete cipher; }
24
 
   private:
25
 
      PK_Encryptor* cipher;
26
 
      SecureVector<byte> buffer;
27
 
   };
28
 
 
29
 
/*************************************************
30
 
* PK_Decryptor Filter                            *
31
 
*************************************************/
32
 
class PK_Decryptor_Filter : public Filter
33
 
   {
34
 
   public:
35
 
      void write(const byte[], u32bit);
36
 
      void end_msg();
37
 
      PK_Decryptor_Filter(PK_Decryptor* c) : cipher(c) {}
38
 
      ~PK_Decryptor_Filter() { delete cipher; }
39
 
   private:
40
 
      PK_Decryptor* cipher;
41
 
      SecureVector<byte> buffer;
42
 
   };
43
 
 
44
 
/*************************************************
45
 
* PK_Signer Filter                               *
46
 
*************************************************/
47
 
class PK_Signer_Filter : public Filter
48
 
   {
49
 
   public:
50
 
      void write(const byte[], u32bit);
51
 
      void end_msg();
52
 
      PK_Signer_Filter(PK_Signer* s) : signer(s) {}
53
 
      ~PK_Signer_Filter() { delete signer; }
54
 
   private:
55
 
      PK_Signer* signer;
56
 
   };
57
 
 
58
 
/*************************************************
59
 
* PK_Verifier Filter                             *
60
 
*************************************************/
61
 
class PK_Verifier_Filter : public Filter
62
 
   {
63
 
   public:
64
 
      void write(const byte[], u32bit);
65
 
      void end_msg();
66
 
 
67
 
      void set_signature(const byte[], u32bit);
68
 
      void set_signature(const MemoryRegion<byte>&);
69
 
 
70
 
      PK_Verifier_Filter(PK_Verifier* v) : verifier(v) {}
71
 
      PK_Verifier_Filter(PK_Verifier*, const byte[], u32bit);
72
 
      PK_Verifier_Filter(PK_Verifier*, const MemoryRegion<byte>&);
73
 
      ~PK_Verifier_Filter() { delete verifier; }
74
 
   private:
75
 
      PK_Verifier* verifier;
76
 
      SecureVector<byte> signature;
77
 
   };
78
 
 
79
 
}
80
 
 
81
 
#endif