diff --git a/src/runtime/c/pgf/md5.cxx b/src/runtime/c/pgf/md5.cxx index 6a8b4c8cb..a905788e4 100644 --- a/src/runtime/c/pgf/md5.cxx +++ b/src/runtime/c/pgf/md5.cxx @@ -129,7 +129,7 @@ void md5Step(uint32_t *buffer, uint32_t *input){ * If the input fills out a block of 512 bits, apply the algorithm (md5Step) * and save the result in the buffer. Also updates the overall size. */ -void MD5Context::update(uint8_t *input_buffer, size_t input_len) +void MD5Context::update(const uint8_t *input_buffer, size_t input_len) { uint32_t input[16]; unsigned int offset = this->size % 64; diff --git a/src/runtime/c/pgf/md5.h b/src/runtime/c/pgf/md5.h index 1e33226ec..65fe20170 100644 --- a/src/runtime/c/pgf/md5.h +++ b/src/runtime/c/pgf/md5.h @@ -16,12 +16,12 @@ class PGF_INTERNAL_DECL MD5Context { public: MD5Context(); - void update(uint8_t *input, size_t input_len); + void update(const uint8_t *input, size_t input_len); template - void update(T &input) + void update(const T &input) { - update((uint8_t *) &input, sizeof(T)); + update((const uint8_t *) &input, sizeof(T)); } void finalize(MD5Digest *digest);