ipaddress 1.1.0
Loading...
Searching...
No Matches
hash.hpp File Reference

Algorithms for calculating hash sums. More...

#include "config.hpp"

Go to the source code of this file.

Namespaces

namespace  ipaddress
 Namespace dedicated to IP addresses and networks operations.
 

Detailed Description

Algorithms for calculating hash sums.

Author
Vladimir Shaleev

The hash.hpp file contains hash templates and functions that can be used to hash IP addresses or other numeric data.

This code uses patterns and specializations to optimize the hashing process for different sizes of data. Magic numbers and bitwise operations in hash_combine functions help distribute hash values evenly, which is important for avoiding collisions in hash tables. The hash_sum and calc_hash functions provide a convenient interface for calculating hash sums and computing the hash sum of multiple values.