OpenVPN
siphash.c File Reference
#include <stdlib.h>
#include "syshead.h"
#include "siphash.h"
#include "buffer.h"
#include "crypto.h"
#include "list.h"
Include dependency graph for siphash.c:

Go to the source code of this file.

Functions

uint64_t siphash_hash_func (const uint8_t *k, uint32_t length, const uint8_t hash_key[SIPHASH_KEY_SIZE])
 Wrapper of the siphash function to be able to use it in the hash map.

Function Documentation

◆ siphash_hash_func()

uint64_t siphash_hash_func ( const uint8_t * k,
uint32_t length,
const uint8_t hash_key[SIPHASH_KEY_SIZE] )

Wrapper of the siphash function to be able to use it in the hash map.

Parameters
kthe data to hash
lengthlength of the data to hash
hash_keythe siphash key
Returns
a uint64_t containing the result of the hashing

Definition at line 37 of file siphash.c.

References siphash(), and SIPHASH_KEY_SIZE.

Referenced by mroute_addr_hash_function(), and word_hash_function().