feat: implement encryption

This commit is contained in:
2026-05-14 16:22:52 +02:00
parent caf67b6e74
commit a0aed7e93b
12 changed files with 336 additions and 37 deletions

15
src/util.h Normal file
View File

@@ -0,0 +1,15 @@
#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);