feat: implement encryption
This commit is contained in:
15
src/util.h
Normal file
15
src/util.h
Normal 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);
|
||||
Reference in New Issue
Block a user