1 #ifndef CRYPTOPP_FILES_H
2 #define CRYPTOPP_FILES_H
11 NAMESPACE_BEGIN(CryptoPP)
22 class OpenErr :
public Err {
public:
OpenErr(
const std::string &filename) :
Err(
"FileStore: error opening file for reading: " + filename) {}};
30 #if defined(CRYPTOPP_UNIX_AVAILABLE) || _MSC_VER >= 1400
36 std::istream* GetStream() {
return m_stream;}
38 lword MaxRetrievable()
const;
39 size_t TransferTo2(
BufferedTransformation &target, lword &transferBytes,
const std::string &channel=DEFAULT_CHANNEL,
bool blocking=
true);
40 size_t CopyRangeTo2(
BufferedTransformation &target, lword &begin, lword end=LWORD_MAX,
const std::string &channel=DEFAULT_CHANNEL,
bool blocking=
true)
const;
41 lword Skip(lword skipMax=ULONG_MAX);
47 std::istream *m_stream;
67 #if defined(CRYPTOPP_UNIX_AVAILABLE) || _MSC_VER >= 1400
73 std::istream* GetStream() {
return m_store.GetStream();}
85 class OpenErr :
public Err {
public:
OpenErr(
const std::string &filename) :
Err(
"FileSink: error opening file for writing: " + filename) {}};
91 FileSink(
const char *filename,
bool binary=
true)
93 #if defined(CRYPTOPP_UNIX_AVAILABLE) || _MSC_VER >= 1400
95 FileSink(
const wchar_t *filename,
bool binary=
true)
99 std::ostream* GetStream() {
return m_stream;}
102 size_t Put2(
const byte *inString,
size_t length,
int messageEnd,
bool blocking);
103 bool IsolatedFlush(
bool hardFlush,
bool blocking);
107 std::ostream *m_stream;