12#include <botan/data_src.h>
13#include <botan/exceptn.h>
14#include <initializer_list>
66 void write(
const uint8_t in[],
size_t length);
73 { write(in.data(), in.size()); }
79 void write(
const std::vector<uint8_t>& in)
80 { write(in.data(), in.size()); }
86 void write(std::string_view in);
98 void write(uint8_t in);
105 void process_msg(
const uint8_t in[],
size_t length);
117 void process_msg(
const std::vector<uint8_t>& in);
123 void process_msg(std::string_view in);
137 [[nodiscard]]
size_t remaining(message_id msg = DEFAULT_MESSAGE)
const;
148 [[nodiscard]]
size_t read(uint8_t output[],
size_t length)
override;
159 [[nodiscard]]
size_t read(uint8_t output[],
size_t length, message_id msg);
170 [[nodiscard]]
size_t read(uint8_t& output, message_id msg = DEFAULT_MESSAGE);
184 [[nodiscard]] std::string read_all_as_string(message_id msg = DEFAULT_MESSAGE);
195 [[nodiscard]]
size_t peek(uint8_t output[],
size_t length,
size_t offset)
const override;
206 [[nodiscard]]
size_t peek(uint8_t output[],
size_t length,
207 size_t offset, message_id msg)
const;
217 [[nodiscard]]
size_t peek(uint8_t& output,
size_t offset,
218 message_id msg = DEFAULT_MESSAGE)
const;
223 size_t get_bytes_read()
const override;
228 size_t get_bytes_read(message_id msg)
const;
230 bool check_available(
size_t n)
override;
231 bool check_available_msg(
size_t n, message_id msg)
const;
243 void set_default_msg(message_id msg);
249 message_id message_count()
const;
255 bool end_of_data()
const override;
275 BOTAN_DEPRECATED(
"Runtime modification of Pipe deprecated")
276 void prepend(
Filter* filt);
285 BOTAN_DEPRECATED("Runtime modification of
Pipe deprecated")
286 void append(
Filter* filt);
291 BOTAN_DEPRECATED("Runtime modification of
Pipe deprecated")
297 BOTAN_DEPRECATED("Runtime modification of
Pipe deprecated")
309 void append_filter(
Filter* filt);
320 void prepend_filter(
Filter* filt);
341 void do_append(
Filter* filt);
342 void do_prepend(
Filter* filt);
343 void find_endpoints(
Filter*);
344 void clear_endpoints(
Filter*);
372#if defined(BOTAN_HAS_PIPE_UNIXFD_IO)
373 #include <botan/fd_unix.h>
static const message_id LAST_MESSAGE
size_t default_msg() const
static const message_id DEFAULT_MESSAGE
void write(const secure_vector< uint8_t > &in)
void write(const std::vector< uint8_t > &in)
int(* final)(unsigned char *, CTX *)
#define BOTAN_PUBLIC_API(maj, min)
std::vector< T, secure_allocator< T > > secure_vector