summaryrefslogtreecommitdiff
path: root/src/utils/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/cpp')
-rw-r--r--src/utils/cpp/verify_hash.hpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/utils/cpp/verify_hash.hpp b/src/utils/cpp/verify_hash.hpp
index 4ec3a30b..e827680d 100644
--- a/src/utils/cpp/verify_hash.hpp
+++ b/src/utils/cpp/verify_hash.hpp
@@ -24,6 +24,7 @@
/// \brief Check if the passed string \p s is a hash.
/// This function is mainly used to check that the hash of a Digest received
/// over the wire is a real hash, to prevent a malicious attack.
+/// \returns Nullopt on success, error message on failure.
[[nodiscard]] static inline auto IsAHash(std::string const& s) noexcept
-> std::optional<std::string> {
if (!std::all_of(s.begin(), s.end(), [](unsigned char c) {