diff options
Diffstat (limited to 'libqpdf/Pl_RC4.cc')
-rw-r--r-- | libqpdf/Pl_RC4.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libqpdf/Pl_RC4.cc b/libqpdf/Pl_RC4.cc index aa4c089e..17da3f53 100644 --- a/libqpdf/Pl_RC4.cc +++ b/libqpdf/Pl_RC4.cc @@ -2,9 +2,12 @@ #include <qpdf/QUtil.hh> -Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next, - unsigned char const* key_data, int key_len, - size_t out_bufsize) : +Pl_RC4::Pl_RC4( + char const* identifier, + Pipeline* next, + unsigned char const* key_data, + int key_len, + size_t out_bufsize) : Pipeline(identifier, next), out_bufsize(out_bufsize), rc4(key_data, key_len) @@ -19,8 +22,7 @@ Pl_RC4::~Pl_RC4() void Pl_RC4::write(unsigned char* data, size_t len) { - if (this->outbuf.get() == 0) - { + if (this->outbuf.get() == 0) { throw std::logic_error( this->identifier + ": Pl_RC4: write() called after finish() called"); @@ -29,8 +31,7 @@ Pl_RC4::write(unsigned char* data, size_t len) size_t bytes_left = len; unsigned char* p = data; - while (bytes_left > 0) - { + while (bytes_left > 0) { size_t bytes = (bytes_left < this->out_bufsize ? bytes_left : out_bufsize); bytes_left -= bytes; |