#include <filter.h>

Public Member Functions | |
| virtual bool | attachable () |
| virtual void | end_msg () |
| virtual std::string | name () const =0 |
| virtual void | start_msg () |
| virtual void | write (const byte input[], u32bit length)=0 |
| virtual | ~Filter () |
Protected Member Functions | |
| Filter () | |
| void | send (const MemoryRegion< byte > &in) |
| void | send (byte in) |
| void | send (const byte in[], u32bit length) |
Friends | |
| class | Fanout_Filter |
| class | Pipe |
Definition at line 19 of file filter.h.
| virtual Botan::Filter::~Filter | ( | ) | [inline, virtual] |
| Botan::Filter::Filter | ( | ) | [protected] |
Definition at line 17 of file filter.cpp.
00018 { 00019 next.resize(1); 00020 port_num = 0; 00021 filter_owns = 0; 00022 owned = false; 00023 }
| virtual bool Botan::Filter::attachable | ( | ) | [inline, virtual] |
Check whether this filter is an attachable filter.
Reimplemented in Botan::DataSink, and Botan::SecureQueue.
Definition at line 50 of file filter.h.
| virtual void Botan::Filter::end_msg | ( | ) | [inline, virtual] |
Notify that the current message is finished; flush buffers and do end-of-message processing (if any).
Reimplemented in Botan::Base64_Encoder, Botan::Base64_Decoder, Botan::Bzip_Compression, Botan::Bzip_Decompression, Botan::Hash_Filter, Botan::MAC_Filter, Botan::Hex_Encoder, Botan::Hex_Decoder, Botan::PK_Encryptor_Filter, Botan::PK_Decryptor_Filter, Botan::PK_Signer_Filter, Botan::PK_Verifier_Filter, Botan::Zlib_Compression, Botan::Zlib_Decompression, Botan::PBE_PKCS5v15, and Botan::PBE_PKCS5v20.
Definition at line 44 of file filter.h.
| virtual std::string Botan::Filter::name | ( | ) | const [pure virtual] |
Implemented in Botan::Base64_Encoder, Botan::Base64_Decoder, Botan::BitBucket, Botan::Chain, Botan::Fork, Botan::Bzip_Compression, Botan::Bzip_Decompression, Botan::DataSink_Stream, Botan::StreamCipher_Filter, Botan::Hash_Filter, Botan::MAC_Filter, Botan::Hex_Encoder, Botan::Hex_Decoder, Botan::CBC_Encryption, Botan::CBC_Decryption, Botan::CFB_Encryption, Botan::CFB_Decryption, Botan::CTS_Encryption, Botan::CTS_Decryption, Botan::EAX_Base, Botan::ECB_Encryption, Botan::ECB_Decryption, Botan::XTS_Encryption, Botan::XTS_Decryption, Botan::SecureQueue, Botan::Zlib_Compression, Botan::Zlib_Decompression, Botan::PBE_PKCS5v15, and Botan::PBE_PKCS5v20.
Referenced by Botan::Keyed_Filter::set_iv().
| void Botan::Filter::send | ( | const MemoryRegion< byte > & | in | ) | [inline, protected] |
| in | some input for the filter |
Definition at line 68 of file filter.h.
References Botan::MemoryRegion< T >::begin(), send(), and Botan::MemoryRegion< T >::size().
Referenced by send().
00068 { send(in.begin(), in.size()); }
| void Botan::Filter::send | ( | byte | in | ) | [inline, protected] |
| in | some input for the filter | |
| length | the length of in |
Definition at line 28 of file filter.cpp.
References Botan::MemoryRegion< T >::append(), Botan::MemoryRegion< T >::destroy(), Botan::MemoryRegion< T >::size(), and write().
Referenced by Botan::Zlib_Decompression::end_msg(), Botan::Zlib_Compression::end_msg(), Botan::PK_Verifier_Filter::end_msg(), Botan::PK_Signer_Filter::end_msg(), Botan::PK_Decryptor_Filter::end_msg(), Botan::PK_Encryptor_Filter::end_msg(), Botan::Hex_Encoder::end_msg(), Botan::Bzip_Decompression::end_msg(), Botan::Bzip_Compression::end_msg(), Botan::Base64_Decoder::end_msg(), Botan::Base64_Encoder::end_msg(), Botan::MAC_Filter::end_msg(), Botan::Hash_Filter::end_msg(), Botan::Zlib_Compression::flush(), Botan::Bzip_Compression::flush(), Botan::Zlib_Decompression::write(), Botan::Zlib_Compression::write(), Botan::Bzip_Decompression::write(), Botan::Bzip_Compression::write(), and Botan::StreamCipher_Filter::write().
00029 { 00030 bool nothing_attached = true; 00031 for(u32bit j = 0; j != total_ports(); ++j) 00032 if(next[j]) 00033 { 00034 if(write_queue.size()) 00035 next[j]->write(write_queue, write_queue.size()); 00036 next[j]->write(input, length); 00037 nothing_attached = false; 00038 } 00039 00040 if(nothing_attached) 00041 write_queue.append(input, length); 00042 else 00043 write_queue.destroy(); 00044 }
| virtual void Botan::Filter::start_msg | ( | ) | [inline, virtual] |
Start a new message. Must be closed by end_msg() before another message can be started.
Reimplemented in Botan::Bzip_Compression, Botan::Bzip_Decompression, Botan::EAX_Base, Botan::Zlib_Compression, Botan::Zlib_Decompression, Botan::PBE_PKCS5v15, and Botan::PBE_PKCS5v20.
Definition at line 38 of file filter.h.
Write a portion of a message to this filter.
| input | the input as a byte array | |
| length | the length of the byte array input |
Implemented in Botan::Base64_Encoder, Botan::Base64_Decoder, Botan::BitBucket, Botan::Chain, Botan::Fork, Botan::Bzip_Compression, Botan::Bzip_Decompression, Botan::DataSink_Stream, Botan::StreamCipher_Filter, Botan::Hash_Filter, Botan::MAC_Filter, Botan::Hex_Encoder, Botan::Hex_Decoder, Botan::PK_Encryptor_Filter, Botan::PK_Decryptor_Filter, Botan::PK_Signer_Filter, Botan::PK_Verifier_Filter, Botan::SecureQueue, Botan::Zlib_Compression, Botan::Zlib_Decompression, Botan::PBE_PKCS5v15, and Botan::PBE_PKCS5v20.
Referenced by send(), and Botan::Pipe::write().
friend class Fanout_Filter [friend] |
1.5.8