7 #ifndef CRYPTOPP_FILES_H 8 #define CRYPTOPP_FILES_H 32 class OpenErr :
public Err {
public:
OpenErr(
const std::string &filename) :
Err(
"FileStore: error opening file for reading: " + filename) {}};
37 FileStore() : m_stream(NULLPTR), m_space(NULLPTR), m_len(0), m_waiting(0) {}
41 FileStore(std::istream &in) : m_stream(NULLPTR), m_space(NULLPTR), m_len(0), m_waiting(0)
46 FileStore(
const char *filename) : m_stream(NULLPTR), m_space(NULLPTR), m_len(0), m_waiting(0)
49 #if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING) || _MSC_VER >= 1400 63 const std::istream*
GetStream()
const {
return m_stream;}
65 lword MaxRetrievable()
const;
68 lword Skip(lword skipMax=ULONG_MAX);
74 std::istream *m_stream;
108 #if defined(CRYPTOPP_UNIX_AVAILABLE) || defined(CRYPTOPP_DOXYGEN_PROCESSING) || _MSC_VER >= 1400 136 class OpenErr :
public Err {
public:
OpenErr(
const std::string &filename) :
Err(
"FileSink: error opening file for writing: " + filename) {}};
154 #if defined(CRYPTOPP_UNIX_AVAILABLE) || _MSC_VER >= 1400 158 FileSink(
const wchar_t *filename,
bool binary=
true)
167 size_t Put2(
const byte *inString,
size_t length,
int messageEnd,
bool blocking);
172 std::ostream *m_stream;
Create a working space in a BufferedTransformation.
Base class for all exceptions thrown by the library.
Standard names for retrieving values by name when working with NameValuePairs.
const char * InputFileNameWide()
const wchar_t *
std::istream * GetStream()
Retrieves the internal stream.
Implementation of Store interface.
FileStore()
Construct a FileStore.
Abstract base classes that provide a uniform interface to this library.
Classes for automatic resource management.
const char * OutputStreamPointer()
std::ostream *
Acts as a Source for pre-existing, static data.
FileSource(const char *filename, bool pumpAll, BufferedTransformation *attachment=NULL, bool binary=true)
Construct a FileSource.
FileStore(const wchar_t *filename)
Construct a FileStore.
const char * InputFileName()
const char *
FileSink(std::ostream &out)
Construct a FileSink.
FileSink(const char *filename, bool binary=true)
Construct a FileSink.
FileSource(const wchar_t *filename, bool pumpAll, BufferedTransformation *attachment=NULL, bool binary=true)
Construct a FileSource.
FileSource(BufferedTransformation *attachment=NULL)
Construct a FileSource.
const char * InputStreamPointer()
std::istream *
const char * OutputBinaryMode()
bool
Transform a Store into a Source.
const std::string DEFAULT_CHANNEL
Default channel for BufferedTransformation.
AlgorithmParameters MakeParameters(const char *name, const T &value, bool throwIfNotUsed=true)
Create an object that implements NameValuePairs.
const char * OutputFileName()
const char *
FileStore(std::istream &in)
Construct a FileStore.
Exception thrown when file-based write error is encountered.
FileStore(const char *filename)
Construct a FileStore.
Exception thrown when file-based error is encountered.
Implementation of BufferedTransformation's attachment interface.
Implementation of Store interface.
std::istream * GetStream()
Retrieves the internal stream.
Exception thrown when file-based open error is encountered.
std::ostream * GetStream()
Retrieves the internal stream.
FileSink()
Construct a FileSink.
Implementation of BufferedTransformation's attachment interface.
FileSource(std::istream &in, bool pumpAll, BufferedTransformation *attachment=NULL)
Construct a FileSource.
Crypto++ library namespace.
const char * InputBinaryMode()
bool
Implementation of Store interface.
Exception thrown when file-based read error is encountered.
Ensures an object is not copyable.
const std::istream * GetStream() const
Retrieves the internal stream.
Exception thrown when file-based error is encountered.
const char * OutputFileNameWide()
const wchar_t *
Interface for retrieving values given their names.
Exception thrown when file-based open error is encountered.