Botan
1.10.17
src
filters
pk_filts
pk_filts.h
Go to the documentation of this file.
1
/*
2
* PK Filters
3
* (C) 1999-2009 Jack Lloyd
4
*
5
* Distributed under the terms of the Botan license
6
*/
7
8
#ifndef BOTAN_PK_FILTERS_H__
9
#define BOTAN_PK_FILTERS_H__
10
11
#include <botan/filter.h>
12
#include <botan/pubkey.h>
13
14
namespace
Botan
{
15
16
/**
17
* PK_Encryptor Filter
18
*/
19
class
BOTAN_DLL
PK_Encryptor_Filter
:
public
Filter
20
{
21
public
:
22
std::string
name
()
const
{
return
"PK Encryptor"
; }
23
24
void
write(
const
byte
[],
size_t
);
25
void
end_msg();
26
PK_Encryptor_Filter
(
PK_Encryptor
* c,
27
RandomNumberGenerator
& rng_ref) :
28
cipher(c), rng(rng_ref) {}
29
~PK_Encryptor_Filter
() {
delete
cipher; }
30
private
:
31
PK_Encryptor
* cipher;
32
RandomNumberGenerator
& rng;
33
SecureVector<byte>
buffer;
34
};
35
36
/**
37
* PK_Decryptor Filter
38
*/
39
class
BOTAN_DLL
PK_Decryptor_Filter
:
public
Filter
40
{
41
public
:
42
std::string
name
()
const
{
return
"PK Decryptor"
; }
43
44
void
write(
const
byte
[],
size_t
);
45
void
end_msg();
46
PK_Decryptor_Filter
(
PK_Decryptor
* c) : cipher(c) {}
47
~PK_Decryptor_Filter
() {
delete
cipher; }
48
private
:
49
PK_Decryptor
* cipher;
50
SecureVector<byte>
buffer;
51
};
52
53
/**
54
* PK_Signer Filter
55
*/
56
class
BOTAN_DLL
PK_Signer_Filter
:
public
Filter
57
{
58
public
:
59
std::string
name
()
const
{
return
"PK Signer"
; }
60
61
void
write(
const
byte
[],
size_t
);
62
void
end_msg();
63
64
PK_Signer_Filter
(
PK_Signer
* s,
65
RandomNumberGenerator
& rng_ref) :
66
signer(s), rng(rng_ref) {}
67
68
~PK_Signer_Filter
() {
delete
signer; }
69
private
:
70
PK_Signer
* signer;
71
RandomNumberGenerator
& rng;
72
};
73
74
/**
75
* PK_Verifier Filter
76
*/
77
class
BOTAN_DLL
PK_Verifier_Filter
:
public
Filter
78
{
79
public
:
80
std::string
name
()
const
{
return
"PK Verifier"
; }
81
82
void
write(
const
byte
[],
size_t
);
83
void
end_msg();
84
85
void
set_signature(
const
byte
[],
size_t
);
86
void
set_signature(
const
MemoryRegion<byte>
&);
87
88
PK_Verifier_Filter
(
PK_Verifier
* v) : verifier(v) {}
89
PK_Verifier_Filter
(
PK_Verifier
*,
const
byte
[],
size_t
);
90
PK_Verifier_Filter
(
PK_Verifier
*,
const
MemoryRegion<byte>
&);
91
~PK_Verifier_Filter
() {
delete
verifier; }
92
private
:
93
PK_Verifier
* verifier;
94
SecureVector<byte>
signature;
95
};
96
97
}
98
99
#endif
Botan::PK_Verifier_Filter::PK_Verifier_Filter
PK_Verifier_Filter(PK_Verifier *v)
Definition:
pk_filts.h:88
Botan::RandomNumberGenerator
Definition:
rng.h:20
Botan::PK_Verifier_Filter
Definition:
pk_filts.h:77
Botan::PK_Decryptor_Filter::PK_Decryptor_Filter
PK_Decryptor_Filter(PK_Decryptor *c)
Definition:
pk_filts.h:46
Botan::PK_Verifier_Filter::name
std::string name() const
Definition:
pk_filts.h:80
Botan::PK_Signer_Filter
Definition:
pk_filts.h:56
Botan::byte
unsigned char byte
Definition:
types.h:22
Botan::PK_Encryptor_Filter::~PK_Encryptor_Filter
~PK_Encryptor_Filter()
Definition:
pk_filts.h:29
Botan::Filter
Definition:
filter.h:19
Botan::PK_Encryptor_Filter::PK_Encryptor_Filter
PK_Encryptor_Filter(PK_Encryptor *c, RandomNumberGenerator &rng_ref)
Definition:
pk_filts.h:26
Botan::PK_Verifier_Filter::~PK_Verifier_Filter
~PK_Verifier_Filter()
Definition:
pk_filts.h:91
Botan::PK_Decryptor_Filter
Definition:
pk_filts.h:39
Botan::PK_Encryptor_Filter
Definition:
pk_filts.h:19
Botan::PK_Encryptor_Filter::name
std::string name() const
Definition:
pk_filts.h:22
Botan::MemoryRegion< byte >
Botan
Definition:
algo_base.h:14
Botan::PK_Verifier
Definition:
pubkey.h:211
Botan::PK_Signer_Filter::name
std::string name() const
Definition:
pk_filts.h:59
Botan::PK_Decryptor_Filter::name
std::string name() const
Definition:
pk_filts.h:42
Botan::SecureVector< byte >
Botan::PK_Signer_Filter::PK_Signer_Filter
PK_Signer_Filter(PK_Signer *s, RandomNumberGenerator &rng_ref)
Definition:
pk_filts.h:64
Botan::PK_Signer
Definition:
pubkey.h:123
Botan::PK_Decryptor
Definition:
pubkey.h:85
Botan::PK_Encryptor
Definition:
pubkey.h:37
Botan::PK_Decryptor_Filter::~PK_Decryptor_Filter
~PK_Decryptor_Filter()
Definition:
pk_filts.h:47
Botan::PK_Signer_Filter::~PK_Signer_Filter
~PK_Signer_Filter()
Definition:
pk_filts.h:68
Generated by
1.8.14