9 #ifndef BOTAN_MODE_CFB_H__
10 #define BOTAN_MODE_CFB_H__
12 #include <botan/cipher_mode.h>
13 #include <botan/block_cipher.h>
23 std::string name()
const override;
25 size_t update_granularity()
const override;
27 size_t minimum_final_size()
const override;
31 size_t output_length(
size_t input_length)
const override;
33 size_t default_nonce_length()
const override;
35 bool valid_nonce_length(
size_t n)
const override;
37 void clear()
override;
39 void reset()
override;
45 size_t feedback()
const {
return m_feedback_bytes; }
52 void start_msg(
const uint8_t nonce[],
size_t nonce_len)
override;
53 void key_schedule(
const uint8_t key[],
size_t length)
override;
55 std::unique_ptr<BlockCipher> m_cipher;
58 size_t m_feedback_bytes;
76 size_t process(uint8_t buf[],
size_t size)
override;
96 size_t process(uint8_t buf[],
size_t size)
override;
const BlockCipher & cipher() const
CFB_Encryption(BlockCipher *cipher, size_t feedback_bits)
secure_vector< uint8_t > & shift_register()
std::vector< T, secure_allocator< T >> secure_vector
CFB_Decryption(BlockCipher *cipher, size_t feedback_bits)
secure_vector< uint8_t > & keystream_buf()