userver: utils::StrCaseHash Class Reference
Loading...
Searching...
No Matches
utils::StrCaseHash Class Reference

#include <userver/utils/str_icase.hpp>

Detailed Description

Case sensitive ASCII hashing functor.

Definition at line 22 of file str_icase.hpp.

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
 

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: