8 #ifndef BOTAN_STREAM_MODE_H__
9 #define BOTAN_STREAM_MODE_H__
11 #include <botan/cipher_mode.h>
12 #include <botan/stream_cipher.h>
24 size_t process(uint8_t buf[],
size_t sz)
override
26 m_cipher->cipher1(buf, sz);
31 {
return update(buf, offset); }
33 size_t output_length(
size_t input_length)
const override {
return input_length; }
42 {
return m_cipher->valid_iv_length(nonce_len); }
46 std::string
name()
const override {
return m_cipher->name(); }
54 void reset()
override {
return; }
57 void start_msg(
const uint8_t nonce[],
size_t nonce_len)
override
59 m_cipher->set_iv(nonce, nonce_len);
62 void key_schedule(
const uint8_t key[],
size_t length)
override
64 m_cipher->set_key(key, length);
67 std::unique_ptr<StreamCipher> m_cipher;
size_t default_nonce_length() const override
Key_Length_Specification key_spec() const override
std::string name() const override
size_t process(uint8_t buf[], size_t sz) override
std::vector< T, secure_allocator< T >> secure_vector
size_t output_length(size_t input_length) const override
size_t minimum_final_size() const override
void finish(secure_vector< uint8_t > &buf, size_t offset) override
Stream_Cipher_Mode(StreamCipher *cipher)
bool valid_nonce_length(size_t nonce_len) const override
size_t update_granularity() const override