7#include <botan/sodium.h>
9#include <botan/stream_cipher.h>
17 chacha->write_keystream(out, out_len);
22 uint8_t out[],
const uint8_t in[],
size_t in_len,
const uint8_t nonce[],
const uint8_t key[]) {
27 uint8_t out[],
const uint8_t in[],
size_t in_len,
const uint8_t nonce[], uint64_t ic,
const uint8_t key[]) {
35 chacha->seek(ic * 64);
36 chacha->cipher(in, out, in_len);
44 chacha->write_keystream(out, out_len);
49 uint8_t out[],
const uint8_t in[],
size_t in_len,
const uint8_t nonce[],
const uint8_t key[]) {
54 uint8_t out[],
const uint8_t in[],
size_t in_len,
const uint8_t nonce[], uint32_t ic,
const uint8_t key[]) {
58 chacha->seek(
static_cast<uint64_t
>(ic) * 64);
59 chacha->cipher(in, out, in_len);
67 chacha->write_keystream(out, out_len);
72 uint8_t out[],
const uint8_t in[],
size_t in_len,
const uint8_t nonce[],
const uint8_t key[]) {
77 uint8_t out[],
const uint8_t in[],
size_t in_len,
const uint8_t nonce[], uint64_t ic,
const uint8_t key[]) {
85 chacha->seek(ic * 64);
86 chacha->cipher(in, out, in_len);
static std::unique_ptr< StreamCipher > create_or_throw(std::string_view algo_spec, std::string_view 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[])