Files
vm/src/util.h
2026-05-14 16:22:52 +02:00

16 lines
386 B
C

#pragma once
#include "hwinfo.h"
#include <stdint.h>
#define FNV_PRIME 0x00000100000001b3
// Generate an aes key by hashing the input
// This hash is not safe in any way
// But it is fast and easy to implement!
// https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function
void dual_fnv_hash(char* input, uint8_t key[16]);
uint8_t* hwinfo_to_key(hw_info_t hwinfo);