monotone

monotone Mtn Source Tree

Root/botan/pk_filts.h

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
12namespace Botan {
13
14/*************************************************
15* PK_Encryptor Filter *
16*************************************************/
17class 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*************************************************/
32class 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*************************************************/
47class 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*************************************************/
61class 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

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status