8 #ifndef BOTAN_CHACHA_H__
9 #define BOTAN_CHACHA_H__
11 #include <botan/stream_cipher.h>
28 ChaCha(
size_t rounds = 20);
30 std::string provider()
const override;
32 void cipher(
const uint8_t in[], uint8_t out[],
size_t length)
override;
34 void set_iv(
const uint8_t iv[],
size_t iv_len)
override;
40 bool valid_iv_length(
size_t iv_len)
const override;
47 void clear()
override;
49 std::string name()
const override;
51 void seek(uint64_t offset)
override;
54 void key_schedule(
const uint8_t key[],
size_t key_len)
override;
56 void chacha_x4(uint8_t output[64*4], uint32_t state[16],
size_t rounds);
58 #if defined(BOTAN_HAS_CHACHA_SSE2)
59 void chacha_sse2_x4(uint8_t output[64*4], uint32_t state[16],
size_t rounds);
65 size_t m_position = 0;
StreamCipher * clone() const override
std::vector< T, secure_allocator< T >> secure_vector
Key_Length_Specification key_spec() const override