aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-07-10 16:07:42 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-07-10 16:12:09 +0300
commite766f0c30a33dedd2d49783780f79f994a063ac4 (patch)
treeb63c2fd82891a5f2439a258fd5425ff9fc260ac3
parent24f18983923cc63706e3c5c8a5db6bb073e7afb7 (diff)
Drop unused sha256(istream) function
-rw-r--r--bpkg/checksum.cxx17
-rw-r--r--bpkg/checksum.hxx5
2 files changed, 0 insertions, 22 deletions
diff --git a/bpkg/checksum.cxx b/bpkg/checksum.cxx
index abe2757..7f4afa8 100644
--- a/bpkg/checksum.cxx
+++ b/bpkg/checksum.cxx
@@ -4,14 +4,10 @@
#include <bpkg/checksum.hxx>
-#include <ios> // streamsize
-#include <streambuf>
-
#ifdef _WIN32
# include <algorithm> // replace()
#endif
-#include <libbutl/sha256.mxx>
#include <libbutl/process.mxx>
#include <libbutl/filesystem.mxx>
@@ -344,19 +340,6 @@ namespace bpkg
}
string
- sha256 (istream& is)
- {
- butl::sha256 r;
-
- char buf[8192];
- streambuf& sb (*is.rdbuf ());
- for (streamsize n; (n = sb.sgetn (buf, sizeof (buf))) != 0;)
- r.append (buf, n);
-
- return r.string ();
- }
-
- string
sha256 (const common_options& o, const path& f)
{
if (!exists (f))
diff --git a/bpkg/checksum.hxx b/bpkg/checksum.hxx
index 77a5d18..87380a0 100644
--- a/bpkg/checksum.hxx
+++ b/bpkg/checksum.hxx
@@ -19,11 +19,6 @@ namespace bpkg
inline string
sha256 (const char* buf, size_t n) {return butl::sha256 (buf, n).string ();}
- // The same but for a stream (if ifdstream, open in binary mode).
- //
- string
- sha256 (istream&);
-
// The same but for a file. Issue diagnostics and throw failed if anything
// goes wrong.
//