7#include <botan/sodium.h>
8#include <botan/stream_cipher.h>
13 const uint8_t nonce[],
const uint8_t key[])
18 chacha->write_keystream(out, out_len);
23 size_t in_len,
const uint8_t nonce[],
31 const uint8_t nonce[], uint64_t ic,
40 chacha->seek(ic * 64);
41 chacha->cipher(in, out, in_len);
46 const uint8_t nonce[],
const uint8_t key[])
51 chacha->write_keystream(out, out_len);
56 const uint8_t in[],
size_t in_len,
57 const uint8_t nonce[],
64 const uint8_t in[],
size_t in_len,
65 const uint8_t nonce[], uint32_t ic,
71 chacha->seek(
static_cast<uint64_t
>(ic) * 64);
72 chacha->cipher(in, out, in_len);
77 const uint8_t nonce[],
const uint8_t key[])
82 chacha->write_keystream(out, out_len);
87 size_t in_len,
const uint8_t nonce[],
95 const uint8_t nonce[], uint64_t ic,
104 chacha->seek(ic * 64);
105 chacha->cipher(in, out, in_len);
static std::unique_ptr< StreamCipher > create_or_throw(const std::string &algo_spec, const std::string &provider="")
int crypto_stream_xchacha20_xor(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_stream_chacha20_ietf_xor(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
@ crypto_stream_chacha20_ietf_KEYBYTES
@ crypto_stream_chacha20_ietf_NONCEBYTES
@ crypto_stream_xchacha20_KEYBYTES
@ crypto_stream_xchacha20_NONCEBYTES
@ crypto_stream_chacha20_NONCEBYTES
@ crypto_stream_chacha20_KEYBYTES
int crypto_stream_xchacha20_xor_ic(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[])
int crypto_stream_chacha20_xor_ic(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], uint64_t ic, const uint8_t key[])
int crypto_stream_chacha20(uint8_t out[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_stream_chacha20_ietf(uint8_t out[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_stream_chacha20_xor(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_stream_xchacha20(uint8_t out[], size_t ctext_len, const uint8_t nonce[], const uint8_t key[])
int crypto_stream_chacha20_ietf_xor_ic(uint8_t out[], const uint8_t ptext[], size_t ptext_len, const uint8_t nonce[], uint32_t ic, const uint8_t key[])