aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_SHA2.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-08 15:18:08 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-08 17:51:15 +0100
commitcb769c62e55599e9f980001830bc61d9fcaa64a9 (patch)
tree0bf980c385a61cbc8720cf990762ffc1200f9d6a /libqpdf/Pl_SHA2.cc
parent716381f65a2b2dc72f8da2426ba71aeab02c507f (diff)
downloadqpdf-cb769c62e55599e9f980001830bc61d9fcaa64a9.tar.zst
WHITESPACE ONLY -- expand tabs in source code
This comment expands all tabs using an 8-character tab-width. You should ignore this commit when using git blame or use git blame -w. In the early days, I used to use tabs where possible for indentation, since emacs did this automatically. In recent years, I have switched to only using spaces, which means qpdf source code has been a mixture of spaces and tabs. I have avoided cleaning this up because of not wanting gratuitous whitespaces change to cloud the output of git blame, but I changed my mind after discussing with users who view qpdf source code in editors/IDEs that have other tab widths by default and in light of the fact that I am planning to start applying automatic code formatting soon.
Diffstat (limited to 'libqpdf/Pl_SHA2.cc')
-rw-r--r--libqpdf/Pl_SHA2.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/libqpdf/Pl_SHA2.cc b/libqpdf/Pl_SHA2.cc
index 5057da45..8844eb16 100644
--- a/libqpdf/Pl_SHA2.cc
+++ b/libqpdf/Pl_SHA2.cc
@@ -25,7 +25,7 @@ Pl_SHA2::write(unsigned char* buf, size_t len)
{
if (! this->in_progress)
{
- this->in_progress = true;
+ this->in_progress = true;
}
// Write in chunks in case len is too big to fit in an int.
@@ -35,9 +35,9 @@ Pl_SHA2::write(unsigned char* buf, size_t len)
unsigned char* data = buf;
while (bytes_left > 0)
{
- size_t bytes = (bytes_left >= max_bytes ? max_bytes : bytes_left);
+ size_t bytes = (bytes_left >= max_bytes ? max_bytes : bytes_left);
this->crypto->SHA2_update(data, bytes);
- bytes_left -= bytes;
+ bytes_left -= bytes;
data += bytes;
}
@@ -63,8 +63,8 @@ Pl_SHA2::resetBits(int bits)
{
if (this->in_progress)
{
- throw std::logic_error(
- "bit reset requested for in-progress SHA2 Pipeline");
+ throw std::logic_error(
+ "bit reset requested for in-progress SHA2 Pipeline");
}
this->crypto = QPDFCryptoProvider::getImpl();
this->crypto->SHA2_init(bits);
@@ -75,8 +75,8 @@ Pl_SHA2::getRawDigest()
{
if (this->in_progress)
{
- throw std::logic_error(
- "digest requested for in-progress SHA2 Pipeline");
+ throw std::logic_error(
+ "digest requested for in-progress SHA2 Pipeline");
}
return this->crypto->SHA2_digest();
}
@@ -86,8 +86,8 @@ Pl_SHA2::getHexDigest()
{
if (this->in_progress)
{
- throw std::logic_error(
- "digest requested for in-progress SHA2 Pipeline");
+ throw std::logic_error(
+ "digest requested for in-progress SHA2 Pipeline");
}
return QUtil::hex_encode(getRawDigest());
}