userver: utils::StrCaseHash Class Reference
⚠️ This is the documentation for an old userver version. Click here to switch to the latest version.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
utils::StrCaseHash Class Reference

Case sensitive ASCII hashing functor. More...

#include <userver/utils/str_icase.hpp>

Public Types

using is_transparent = void
 

Public Member Functions

 StrCaseHash ()
 Generates a new random hash seed for each hasher instance.
 
 StrCaseHash (HashSeed seed) noexcept
 
std::size_t operator() (std::string_view s) const &noexcept
 
template<class StringStrongTypedef >
auto operator() (const StringStrongTypedef &s) const &noexcept -> decltype(operator()(std::string_view{s.GetUnderlying()}))
 
HashSeed GetSeed () const noexcept
 

Detailed Description

Case sensitive ASCII hashing functor.

Definition at line 22 of file str_icase.hpp.

Member Typedef Documentation

◆ is_transparent

using utils::StrCaseHash::is_transparent = void

Definition at line 24 of file str_icase.hpp.

Constructor & Destructor Documentation

◆ StrCaseHash()

utils::StrCaseHash::StrCaseHash ( HashSeed  seed)
explicitnoexcept

Uses the provided seed. Use with caution: a constant seed makes the hasher vulnerable to HashDOS attacks when arbitrary keys are allowed.

Member Function Documentation

◆ GetSeed()

HashSeed utils::StrCaseHash::GetSeed ( ) const
inlinenoexcept

Definition at line 45 of file str_icase.hpp.

◆ operator()()

auto utils::StrCaseHash::operator() ( const StringStrongTypedef s) const & -> decltype(operator()(std::string_view{s.GetUnderlying()}))
inlinenoexcept

Definition at line 36 of file str_icase.hpp.


The documentation for this class was generated from the following file: