diff --git a/src/lib/pbkdf/pwdhash.h b/src/lib/pbkdf/pwdhash.h index 3065408ab96..4ca467864d2 100644 --- a/src/lib/pbkdf/pwdhash.h +++ b/src/lib/pbkdf/pwdhash.h @@ -78,7 +78,7 @@ class BOTAN_PUBLIC_API(2, 8) PasswordHash { * This function is const, but is not thread safe. Different threads should * either use unique objects, or serialize all access. */ - void hash(std::span out, std::string_view password, std::span salt) { + void hash(std::span out, std::string_view password, std::span salt) const { this->derive_key(out.data(), out.size(), password.data(), password.size(), salt.data(), salt.size()); } @@ -98,7 +98,7 @@ class BOTAN_PUBLIC_API(2, 8) PasswordHash { std::string_view password, std::span salt, std::span associated_data, - std::span key) { + std::span key) const { this->derive_key(out.data(), out.size(), password.data(), diff --git a/src/lib/tls/tls_extensions.h b/src/lib/tls/tls_extensions.h index 933daddd986..5577c237d90 100644 --- a/src/lib/tls/tls_extensions.h +++ b/src/lib/tls/tls_extensions.h @@ -282,7 +282,7 @@ class BOTAN_UNSTABLE_API Supported_Point_Formats final : public Extension { bool empty() const override { return false; } - bool prefers_compressed() { return m_prefers_compressed; } + bool prefers_compressed() const { return m_prefers_compressed; } private: bool m_prefers_compressed = false; diff --git a/src/lib/utils/http_util/http_util.h b/src/lib/utils/http_util/http_util.h index 58c1a666325..ad5aa9bf386 100644 --- a/src/lib/utils/http_util/http_util.h +++ b/src/lib/utils/http_util/http_util.h @@ -46,7 +46,7 @@ class Response final { std::string status_message() const { return m_status_message; } - void throw_unless_ok() { + void throw_unless_ok() const { if(status_code() != 200) { throw HTTP_Error(status_message()); } diff --git a/src/lib/utils/timer.h b/src/lib/utils/timer.h index 2c1d60017ca..d317810d4b4 100644 --- a/src/lib/utils/timer.h +++ b/src/lib/utils/timer.h @@ -34,7 +34,7 @@ class BOTAN_TEST_API Timer final { void stop(); - bool under(std::chrono::milliseconds msec) { return (milliseconds() < msec.count()); } + bool under(std::chrono::milliseconds msec) const { return (milliseconds() < msec.count()); } class Timer_Scope final { public: