S2OPC OPCUA Toolkit
Loading...
Searching...
No Matches
sopc_hash.h File Reference

Implementations of some hash functions. More...

#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Functions

uint64_t SOPC_DJBHash (const uint8_t *data, size_t len)
 Hashes some data using DJB hash.
 
uint64_t SOPC_DJBHash_Step (uint64_t current, const uint8_t *data, size_t len)
 Appends some data to a DJB hash.
 

Detailed Description

Implementations of some hash functions.

Function Documentation

◆ SOPC_DJBHash()

uint64_t SOPC_DJBHash ( const uint8_t * data,
size_t len )

Hashes some data using DJB hash.

Parameters
dataThe data to hash.
lenThe length of the data, in bytes.
Returns
The resulting hash.

◆ SOPC_DJBHash_Step()

uint64_t SOPC_DJBHash_Step ( uint64_t current,
const uint8_t * data,
size_t len )

Appends some data to a DJB hash.

Parameters
currentThe current value of the hash.
dataThe data to hash.
lenThe length of the data, in bytes.
Returns
The resulting hash.

This interface allows computing a hash over various pieces of data in several calls.