/usr/include/botan-1.10/botan/pk_filts.h is in libbotan1.10-dev 1.10.16-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | /*
* PK Filters
* (C) 1999-2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_PK_FILTERS_H__
#define BOTAN_PK_FILTERS_H__
#include <botan/filter.h>
#include <botan/pubkey.h>
namespace Botan {
/**
* PK_Encryptor Filter
*/
class BOTAN_DLL PK_Encryptor_Filter : public Filter
{
public:
std::string name() const { return "PK Encryptor"; }
void write(const byte[], size_t);
void end_msg();
PK_Encryptor_Filter(PK_Encryptor* c,
RandomNumberGenerator& rng_ref) :
cipher(c), rng(rng_ref) {}
~PK_Encryptor_Filter() { delete cipher; }
private:
PK_Encryptor* cipher;
RandomNumberGenerator& rng;
SecureVector<byte> buffer;
};
/**
* PK_Decryptor Filter
*/
class BOTAN_DLL PK_Decryptor_Filter : public Filter
{
public:
std::string name() const { return "PK Decryptor"; }
void write(const byte[], size_t);
void end_msg();
PK_Decryptor_Filter(PK_Decryptor* c) : cipher(c) {}
~PK_Decryptor_Filter() { delete cipher; }
private:
PK_Decryptor* cipher;
SecureVector<byte> buffer;
};
/**
* PK_Signer Filter
*/
class BOTAN_DLL PK_Signer_Filter : public Filter
{
public:
std::string name() const { return "PK Signer"; }
void write(const byte[], size_t);
void end_msg();
PK_Signer_Filter(PK_Signer* s,
RandomNumberGenerator& rng_ref) :
signer(s), rng(rng_ref) {}
~PK_Signer_Filter() { delete signer; }
private:
PK_Signer* signer;
RandomNumberGenerator& rng;
};
/**
* PK_Verifier Filter
*/
class BOTAN_DLL PK_Verifier_Filter : public Filter
{
public:
std::string name() const { return "PK Verifier"; }
void write(const byte[], size_t);
void end_msg();
void set_signature(const byte[], size_t);
void set_signature(const MemoryRegion<byte>&);
PK_Verifier_Filter(PK_Verifier* v) : verifier(v) {}
PK_Verifier_Filter(PK_Verifier*, const byte[], size_t);
PK_Verifier_Filter(PK_Verifier*, const MemoryRegion<byte>&);
~PK_Verifier_Filter() { delete verifier; }
private:
PK_Verifier* verifier;
SecureVector<byte> signature;
};
}
#endif
|