1 #ifndef CRYPTOPP_FILES_H 2 #define CRYPTOPP_FILES_H 23 class OpenErr :
public Err {
public:
OpenErr(
const std::string &filename) :
Err(
"FileStore: error opening file for reading: " + filename) {}};
26 FileStore() : m_stream(NULL), m_space(NULL), m_len(0), m_waiting(0) {}
27 FileStore(std::istream &in) : m_stream(NULL), m_space(NULL), m_len(0), m_waiting(0)
29 FileStore(
const char *filename) : m_stream(NULL), m_space(NULL), m_len(0), m_waiting(0)
31 #if defined(CRYPTOPP_UNIX_AVAILABLE) || _MSC_VER >= 1400 37 std::istream* GetStream() {
return m_stream;}
39 lword MaxRetrievable()
const;
42 lword Skip(lword skipMax=ULONG_MAX);
48 std::istream *m_stream;
68 #if defined(CRYPTOPP_UNIX_AVAILABLE) || _MSC_VER >= 1400 74 std::istream* GetStream() {
return m_store.GetStream();}
86 class OpenErr :
public Err {
public:
OpenErr(
const std::string &filename) :
Err(
"FileSink: error opening file for writing: " + filename) {}};
92 FileSink(
const char *filename,
bool binary=
true)
94 #if defined(CRYPTOPP_UNIX_AVAILABLE) || _MSC_VER >= 1400 96 FileSink(
const wchar_t *filename,
bool binary=
true)
100 std::ostream* GetStream() {
return m_stream;}
103 size_t Put2(
const byte *inString,
size_t length,
int messageEnd,
bool blocking);
104 bool IsolatedFlush(
bool hardFlush,
bool blocking);
108 std::ostream *m_stream;
Base class for all exceptions thrown by Crypto++.
Standard names for retrieving values by name when working with NameValuePairs.
const char * InputFileNameWide()
const wchar_t *
file-based implementation of Source interface
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.
const char * InputFileName()
const char *
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 *
Implementation of BufferedTransformation's attachment interface in cryptlib.h.
file-based implementation of Store interface
Implementation of BufferedTransformation's attachment interface.
Crypto++ library namespace.
const char * InputBinaryMode()
bool
file-based implementation of Sink interface
Ensures an object is not copyable.
const char * OutputFileNameWide()
const wchar_t *
Interface for retrieving values given their names.