diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-08 08:26:54 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-09-08 08:26:54 +0200 |
commit | 98c4038df36fb73601c58ccd885d1c2d3703cf6e (patch) | |
tree | 627256e1f79a5bcefef72d22cea01bfa490af398 /libbutl/sha1.mxx | |
parent | d7b7fd602b981dd6816b0e5c7c341e2cef272c17 (diff) |
Factor "buffered streambuf" interface from fdbuf to bufstreambuf
Also rename fdbuf to fdstreambuf for consistency.
Diffstat (limited to 'libbutl/sha1.mxx')
-rw-r--r-- | libbutl/sha1.mxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libbutl/sha1.mxx b/libbutl/sha1.mxx index 07c469c..f6fafc0 100644 --- a/libbutl/sha1.mxx +++ b/libbutl/sha1.mxx @@ -8,10 +8,11 @@ // C includes. #ifndef __cpp_lib_modules_ts +#include <iosfwd> // istream #include <string> -#include <cstddef> // size_t +#include <cstddef> // size_t #include <cstdint> -#include <cstring> // strlen() +#include <cstring> // strlen() #endif // Other includes. @@ -27,8 +28,6 @@ import std.core; LIBBUTL_MODEXPORT namespace butl { - class ifdstream; - // SHA1 checksum calculator. // // For a single chunk of data a sum can be obtained in one line, for @@ -67,11 +66,14 @@ LIBBUTL_MODEXPORT namespace butl // Append stream. // + // Note that currently the stream is expected to be bufstreambuf-based + // (e.g., ifdstream). + // void - append (ifdstream&); + append (std::istream&); explicit - sha1 (ifdstream& i): sha1 () {append (i);} + sha1 (std::istream& i): sha1 () {append (i);} // Check if any data has been hashed. // |