#include <cipher_filter.h>
Filter interface for cipher modes
Definition at line 20 of file cipher_filter.h.
Botan::Cipher_Mode_Filter::Cipher_Mode_Filter |
( |
Cipher_Mode * |
t | ) |
|
|
explicit |
Definition at line 27 of file cipher_filter.cpp.
29 mode->minimum_final_size()),
30 m_nonce(mode->default_nonce_length() == 0),
32 m_buffer(m_mode->update_granularity())
Buffered_Filter(size_t block_size, size_t final_minimum)
virtual bool Botan::Filter::attachable |
( |
| ) |
|
|
inlinevirtualinherited |
const Cipher_Mode& Botan::Cipher_Mode_Filter::get_mode |
( |
| ) |
const |
|
inlineprotected |
std::string Botan::Cipher_Mode_Filter::name |
( |
| ) |
const |
|
overridevirtual |
void Botan::Filter::send |
( |
const uint8_t |
in[], |
|
|
size_t |
length |
|
) |
| |
|
protectedvirtualinherited |
- Parameters
-
in | some input for the filter |
length | the length of in |
Definition at line 27 of file filter.cpp.
References Botan::Filter::write().
Referenced by Botan::Hex_Encoder::end_msg(), Botan::Base64_Encoder::end_msg(), Botan::Hex_Decoder::end_msg(), Botan::Base64_Decoder::end_msg(), Botan::Hash_Filter::end_msg(), Botan::MAC_Filter::end_msg(), Botan::StreamCipher_Filter::write(), Botan::Hex_Decoder::write(), and Botan::Base64_Decoder::write().
32 bool nothing_attached =
true;
33 for(
size_t j = 0; j != total_ports(); ++j)
36 if(m_write_queue.size())
37 m_next[j]->
write(m_write_queue.data(), m_write_queue.size());
38 m_next[j]->write(input, length);
39 nothing_attached =
false;
43 m_write_queue += std::make_pair(input, length);
45 m_write_queue.clear();
virtual void write(const uint8_t input[], size_t length)=0
void Botan::Filter::send |
( |
uint8_t |
in | ) |
|
|
inlineprotectedinherited |
void Botan::Filter::send |
( |
const std::vector< uint8_t > & |
in | ) |
|
|
inlineprotectedinherited |
void Botan::Filter::send |
( |
const secure_vector< uint8_t > & |
in, |
|
|
size_t |
length |
|
) |
| |
|
inlineprotectedinherited |
- Parameters
-
in | some input for the filter |
length | the number of bytes of in to send |
Definition at line 81 of file filter.h.
83 send(in.data(), length);
virtual void send(const uint8_t in[], size_t length)
void Botan::Filter::send |
( |
const std::vector< uint8_t > & |
in, |
|
|
size_t |
length |
|
) |
| |
|
inlineprotectedinherited |
- Parameters
-
in | some input for the filter |
length | the number of bytes of in to send |
Definition at line 90 of file filter.h.
92 send(in.data(), length);
virtual void send(const uint8_t in[], size_t length)
void Botan::Cipher_Mode_Filter::set_key |
( |
const SymmetricKey & |
key | ) |
|
|
overridevirtual |
bool Botan::Cipher_Mode_Filter::valid_iv_length |
( |
size_t |
length | ) |
const |
|
overridevirtual |
Check whether an IV length is valid for this filter
- Parameters
-
length | the IV length to be checked for validity |
- Returns
- true if the IV length is valid, false otherwise
Reimplemented from Botan::Keyed_Filter.
Definition at line 71 of file cipher_filter.cpp.
73 return m_mode->valid_nonce_length(length);
bool Botan::Keyed_Filter::valid_keylength |
( |
size_t |
length | ) |
const |
|
inlineinherited |
Check whether a key length is valid for this filter
- Parameters
-
length | the key length to be checked for validity |
- Returns
- true if the key length is valid, false otherwise
Definition at line 42 of file key_filt.h.
bool valid_keylength(size_t length) const
virtual Key_Length_Specification key_spec() const =0
The documentation for this class was generated from the following files: