| Botan
    1.10.16
    | 
#include <buf_filt.h>
 
  
 | Public Member Functions | |
| Buffered_Filter (size_t block_size, size_t final_minimum) | |
| void | end_msg () | 
| void | write (const byte in[], size_t length) | 
| virtual | ~Buffered_Filter () | 
| Protected Member Functions | |
| void | buffer_reset () | 
| virtual void | buffered_block (const byte input[], size_t length)=0 | 
| size_t | buffered_block_size () const | 
| virtual void | buffered_final (const byte input[], size_t length)=0 | 
| size_t | current_position () const | 
Filter mixin that breaks input into blocks, useful for cipher modes
Definition at line 19 of file buf_filt.h.
| Botan::Buffered_Filter::Buffered_Filter | ( | size_t | block_size, | 
| size_t | final_minimum | ||
| ) | 
Initialize a Buffered_Filter
| block_size | the function buffered_block will be called with inputs which are a multiple of this size | 
| final_minimum | the function buffered_final will be called with at least this many bytes. | 
Definition at line 18 of file buf_filt.cpp.
References Botan::MemoryRegion< T >::resize().
| 
 | inlinevirtual | 
Definition at line 46 of file buf_filt.h.
| 
 | inlineprotected | 
Reset the buffer position
Definition at line 77 of file buf_filt.h.
Referenced by Botan::CBC_Encryption::set_iv(), and Botan::CBC_Decryption::set_iv().
| 
 | protectedpure virtual | 
| 
 | inlineprotected | 
Definition at line 67 of file buf_filt.h.
Referenced by Botan::ECB_Decryption::ECB_Decryption(), and Botan::ECB_Encryption::ECB_Encryption().
| 
 | protectedpure virtual | 
The final block, implemented by subclasses
| input | some input bytes | 
| length | the size of input, guaranteed to be at least final_minimum bytes | 
Referenced by end_msg().
| 
 | inlineprotected | 
Definition at line 72 of file buf_filt.h.
Referenced by Botan::ECB_Encryption::name(), and Botan::CBC_Encryption::set_iv().
| void Botan::Buffered_Filter::end_msg | ( | ) | 
Finish a message, emitting to buffered_block and buffered_final Will throw an exception if less than final_minimum bytes were written into the filter.
Definition at line 82 of file buf_filt.cpp.
References buffered_block(), and buffered_final().
Referenced by Botan::ECB_Encryption::name(), Botan::ECB_Decryption::name(), Botan::CBC_Encryption::set_iv(), Botan::CBC_Decryption::set_iv(), Botan::XTS_Encryption::set_key(), and Botan::XTS_Decryption::set_key().
| void Botan::Buffered_Filter::write | ( | const byte | in[], | 
| size_t | length | ||
| ) | 
Write bytes into the buffered filter, which will them emit them in calls to buffered_block in the subclass
| in | the input bytes | 
| length | of in in bytes | 
Definition at line 34 of file buf_filt.cpp.
References buffered_block(), Botan::copy_mem(), Botan::CT::min(), Botan::round_down(), and Botan::MemoryRegion< T >::size().
Referenced by Botan::ECB_Encryption::name(), Botan::ECB_Decryption::name(), Botan::CBC_Encryption::set_iv(), Botan::CBC_Decryption::set_iv(), Botan::XTS_Encryption::set_key(), and Botan::XTS_Decryption::set_key().
 1.8.13
 1.8.13