|
Botan 3.14.1
Crypto and TLS for C&
|
#include <filters.h>
Public Member Functions | |
| Buffered_Filter (size_t block_size, size_t final_minimum) | |
| void | end_msg () |
| template<typename Alloc> | |
| void | write (const std::vector< uint8_t, Alloc > &in, size_t length) |
| void | write (const uint8_t in[], size_t length) |
| virtual | ~Buffered_Filter ()=default |
Protected Member Functions | |
| void | buffer_reset () |
| virtual void | buffered_block (const uint8_t input[], size_t length)=0 |
| size_t | buffered_block_size () const |
| virtual void | buffered_final (const uint8_t input[], size_t length)=0 |
| size_t | current_position () const |
Filter mixin that breaks input into blocks, useful for cipher modes
| 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.
Referenced by Botan::Cipher_Mode_Filter::Cipher_Mode_Filter().
|
virtualdefault |
|
inlineprotected |
|
protectedpure virtual |
|
inlineprotected |
|
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 |
| 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 79 of file buf_filt.cpp.
References buffered_block(), and buffered_final().
|
inline |
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 57 of file filters.h.
References write().
| void Botan::Buffered_Filter::write | ( | const uint8_t | 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(), and Botan::copy_mem().
Referenced by write().