aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_MD5.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-05-03 23:43:07 +0200
committerJay Berkenbilt <ejb@ql.org>2022-05-04 00:31:22 +0200
commit59f3e09edfc71556208a866bb97ed9e173bd827f (patch)
treed182b59b18bae5214dab05e9f6a318f88e035ac3 /libqpdf/Pl_MD5.cc
parentd55c7ac570a2852547caaa78b73b9fab5494aea1 (diff)
downloadqpdf-59f3e09edfc71556208a866bb97ed9e173bd827f.tar.zst
Make Pipeline::write take an unsigned char const* (API change)
Diffstat (limited to 'libqpdf/Pl_MD5.cc')
-rw-r--r--libqpdf/Pl_MD5.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/Pl_MD5.cc b/libqpdf/Pl_MD5.cc
index a5e64139..358f5806 100644
--- a/libqpdf/Pl_MD5.cc
+++ b/libqpdf/Pl_MD5.cc
@@ -11,7 +11,7 @@ Pl_MD5::Pl_MD5(char const* identifier, Pipeline* next) :
}
void
-Pl_MD5::write(unsigned char* buf, size_t len)
+Pl_MD5::write(unsigned char const* buf, size_t len)
{
if (this->enabled) {
if (!this->in_progress) {
@@ -23,11 +23,11 @@ Pl_MD5::write(unsigned char* buf, size_t len)
// Assume int is at least 32 bits.
static size_t const max_bytes = 1 << 30;
size_t bytes_left = len;
- unsigned char* data = buf;
+ unsigned char const* data = buf;
while (bytes_left > 0) {
size_t bytes = (bytes_left >= max_bytes ? max_bytes : bytes_left);
this->md5.encodeDataIncrementally(
- reinterpret_cast<char*>(data), bytes);
+ reinterpret_cast<char const*>(data), bytes);
bytes_left -= bytes;
data += bytes;
}