10#include <botan/data_snk.h>
12#include <botan/exceptn.h>
13#include <botan/internal/fmt.h>
16#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM)
28 throw Stream_IO_Error(
"DataSink_Stream: Failure writing to " + m_identifier);
44#if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM)
51 m_sink_memory(
std::make_unique<
std::ofstream>(
std::string(path), use_binary ?
std::ios::binary :
std::ios::out)),
52 m_sink(*m_sink_memory) {
void write(const uint8_t[], size_t) override
DataSink_Stream(std::ostream &stream, std::string_view name="<std::ostream>")
std::string fmt(std::string_view format, const T &... args)
const char * cast_uint8_ptr_to_char(const uint8_t *b)