summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeffrey Walton <noloader@gmail.com>2020-09-20 06:29:13 -0400
committerJeffrey Walton <noloader@gmail.com>2020-09-20 06:29:13 -0400
commit58e7247a9c7e96de4320e0b6b33d698bd45277cd (patch)
treec9fb981870c2f43899529db6ea261c99820d4573
parentc280ccd33b3d85dbd2e5a3edd4fbeeded65a2288 (diff)
downloadcryptopp-git-58e7247a9c7e96de4320e0b6b33d698bd45277cd.tar.gz
Update documentation
-rw-r--r--cryptlib.h8
-rw-r--r--files.h4
2 files changed, 10 insertions, 2 deletions
diff --git a/cryptlib.h b/cryptlib.h
index 2f27736b..45732286 100644
--- a/cryptlib.h
+++ b/cryptlib.h
@@ -1871,8 +1871,12 @@ public:
/// \brief Provides the number of bytes ready for retrieval
/// \return the number of bytes ready for retrieval
- /// \details All retrieval functions return the actual number of bytes retrieved, which is
- /// the lesser of the request number and MaxRetrievable()
+ /// \details The number of bytes available are dependent on the source. If an exact value is
+ /// available, then the exact value is returned. The exact value can include 0 if the source
+ /// is exhausted.
+ /// \details Some stream-based sources do not allow seeking() on the underlying stream, such
+ /// as some FileSource(). If the stream does not allow seeking() then MaxRetrievable()
+ /// returns LWORD_MAX to indicate there are still bytes to be retrieved.
virtual lword MaxRetrievable() const;
/// \brief Determines whether bytes are ready for retrieval
diff --git a/files.h b/files.h
index ca5172d5..16fe46f2 100644
--- a/files.h
+++ b/files.h
@@ -62,6 +62,10 @@ public:
/// \returns the internal stream pointer
const std::istream* GetStream() const {return m_stream;}
+ /// \brief Provides the number of bytes ready for retrieval
+ /// \return the number of bytes ready for retrieval
+ /// \details All retrieval functions return the actual number of bytes retrieved, which is
+ /// the lesser of the request number and MaxRetrievable()
lword MaxRetrievable() const;
size_t TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true);
size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=DEFAULT_CHANNEL, bool blocking=true) const;