#include <filters.h>
Hash Filter.
Definition at line 104 of file filters.h.
Botan::Hash_Filter::Hash_Filter |
( |
HashFunction * |
hash_fun, |
|
|
size_t |
len = 0 |
|
) |
| |
|
inline |
Construct a hash filter.
- Parameters
-
hash_fun | the hash function to use |
len | the output length of this filter. Leave the default value 0 if you want to use the full output of the hashfunction hash. Otherwise, specify a smaller value here so that the output of the hash algorithm will be cut off. |
Definition at line 120 of file filters.h.
121 OUTPUT_LENGTH(len), hash(hash_fun) {}
Botan::Hash_Filter::Hash_Filter |
( |
const std::string & |
request, |
|
|
size_t |
len = 0 |
|
) |
| |
Botan::Hash_Filter::~Hash_Filter |
( |
| ) |
|
|
inline |
virtual bool Botan::Filter::attachable |
( |
| ) |
|
|
inlinevirtualinherited |
void Botan::Hash_Filter::end_msg |
( |
| ) |
|
|
virtual |
std::string Botan::Hash_Filter::name |
( |
| ) |
const |
|
inlinevirtual |
- Returns
- descriptive name for this filter
Implements Botan::Filter.
Definition at line 110 of file filters.h.
110 {
return hash->
name(); }
virtual std::string name() const =0
void Botan::Filter::send |
( |
const byte |
in[], |
|
|
size_t |
length |
|
) |
| |
|
protectedinherited |
- Parameters
-
in | some input for the filter |
length | the length of in |
Definition at line 28 of file filter.cpp.
References Botan::MemoryRegion< T >::clear(), Botan::MemoryRegion< T >::size(), and Botan::Filter::write().
Referenced by Botan::PK_Encryptor_Filter::end_msg(), Botan::Zlib_Compression::end_msg(), Botan::Bzip_Compression::end_msg(), Botan::Hex_Encoder::end_msg(), Botan::Base64_Encoder::end_msg(), Botan::PK_Decryptor_Filter::end_msg(), Botan::Bzip_Decompression::end_msg(), Botan::Zlib_Decompression::end_msg(), Botan::PK_Signer_Filter::end_msg(), Botan::Hex_Decoder::end_msg(), Botan::Base64_Decoder::end_msg(), Botan::PK_Verifier_Filter::end_msg(), end_msg(), Botan::MAC_Filter::end_msg(), Botan::Bzip_Compression::flush(), Botan::Zlib_Compression::flush(), Botan::Zlib_Compression::write(), Botan::Bzip_Compression::write(), Botan::StreamCipher_Filter::write(), Botan::Bzip_Decompression::write(), Botan::Zlib_Decompression::write(), Botan::Hex_Decoder::write(), and Botan::Base64_Decoder::write().
30 bool nothing_attached =
true;
31 for(
size_t j = 0; j != total_ports(); ++j)
34 if(write_queue.
size())
35 next[j]->
write(&write_queue[0], write_queue.
size());
36 next[j]->write(input, length);
37 nothing_attached =
false;
41 write_queue += std::make_pair(input, length);
virtual void write(const byte input[], size_t length)=0
void Botan::Filter::send |
( |
byte |
in | ) |
|
|
inlineprotectedinherited |
- Parameters
-
in | some input for the filter |
length | the number of bytes of in to send |
Definition at line 74 of file filter.h.
void send(const byte in[], size_t length)
virtual void Botan::Filter::start_msg |
( |
| ) |
|
|
inlinevirtualinherited |
void Botan::Hash_Filter::write |
( |
const byte |
input[], |
|
|
size_t |
length |
|
) |
| |
|
inlinevirtual |
Write a portion of a message to this filter.
- Parameters
-
input | the input as a byte array |
length | the length of the byte array input |
Implements Botan::Filter.
Definition at line 107 of file filters.h.
107 { hash->
update(input, len); }
void update(const byte in[], size_t length)
The documentation for this class was generated from the following files: