Skip to content

armgit / facex

Public Imported from GitHub
0

Full face stack that runs entirely in the browser. Detection, 576-point 3D mesh, recognition, anti-spoof, smile — all WebAssembly, zero server. Apache 2.0.

521 B
Raw Blame
#ifndef WEIGHT_CRYPTO_H
#define WEIGHT_CRYPTO_H

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

/* Encrypt weight file: input (EFXS) → output (EFXE + nonce + encrypted data) */
int weight_encrypt_file(const char* input, const char* output, const char* license);

/* Decrypt in-place. raw must start with EFXE magic.
 * On success: data at raw+20 contains decrypted EFXS payload.
 * Returns: 0 = OK, -1 = not encrypted, -2 = wrong key */
int weight_decrypt_inplace(uint8_t* raw, size_t raw_size, const char* license);

#endif