# Hash Functions

# Description

Hash functions provided in the SDK, used for calculating hash values of data, supporting various common hashing algorithms.

# How to Use

// Calculate hash using MD5 algorithm
const char* md5Result = md5_hash("Hello World");

// Calculate hash using SHA256 algorithm
const char* sha256Result = sha256_hash("Hello World");

// Calculate hash using FNV-1a algorithm
uint32_t fnv1aResult = fnv1a_hash("Hello World");

# md5_hash

char* md5_hash(const char* input)

Calculates the MD5 hash value of the input string.

Parameter Type Description
input const char* Input string for which the hash value needs to be calculated
const char* hash = md5_hash("Hello World");

# sha256_hash

char* sha256_hash(const char* input)

Calculates the SHA256 hash value of the input string.

Parameter Type Description
input const char* Input string for which the hash value needs to be calculated
const char* hash = sha256_hash("Hello World");

# fnv1a_hash

uint32_t fnv1a_hash(const char* input)

Calculates the hash value of a string using the FNV-1a algorithm, suitable for fast hash calculation.

Parameter Type Description
input const char* Input string for which the hash value needs to be calculated
uint32_t hash = fnv1a_hash("Hello World");