#ifndef PQC_BINARY_FORMAT_H
#define PQC_BINARY_FORMAT_H
#pragma once
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#define PQC_BINARY_VERSION 1
typedef struct ByteBuffer {
unsigned char *data;
uintptr_t len;
uintptr_t capacity;
} ByteBuffer;
typedef struct PqcFormatHandle {
uint8_t _private[0];
} PqcFormatHandle;
#ifdef __cplusplus
extern "C" {
#endif
extern const uint16_t PQC_ALGORITHM_CLASSICAL;
extern const uint16_t PQC_ALGORITHM_PASSWORD_CLASSICAL;
extern const uint16_t PQC_ALGORITHM_HYBRID;
extern const uint16_t PQC_ALGORITHM_POST_QUANTUM;
extern const uint16_t PQC_ALGORITHM_ML_KEM_1024;
extern const uint16_t PQC_ALGORITHM_MULTI_KEM;
extern const uint16_t PQC_ALGORITHM_MULTI_KEM_TRIPLE;
extern const uint16_t PQC_ALGORITHM_QUAD_LAYER;
extern const uint16_t PQC_ALGORITHM_PQ3_STACK;
extern const uint16_t PQC_ALGORITHM_LATTICE_CODE_HYBRID;
extern const uint16_t PQC_ALGORITHM_HQC_128;
extern const uint16_t PQC_ALGORITHM_HQC_192;
extern const uint16_t PQC_ALGORITHM_HQC_256;
void pqc_free_buffer(struct ByteBuffer buffer);
void pqc_free_string(char *s);
struct PqcFormatHandle *pqc_format_new(uint16_t algorithm_id, const unsigned char *iv, uintptr_t iv_len, const unsigned char *tag, uintptr_t tag_len, const unsigned char *data, uintptr_t data_len);
struct PqcFormatHandle *pqc_format_new_with_kem(uint16_t algorithm_id, const unsigned char *iv, uintptr_t iv_len, const unsigned char *tag, uintptr_t tag_len, const unsigned char *kem_public_key, uintptr_t kem_public_key_len, const unsigned char *kem_ciphertext, uintptr_t kem_ciphertext_len, const unsigned char *data, uintptr_t data_len);
struct ByteBuffer pqc_format_to_bytes(const struct PqcFormatHandle *handle);
struct PqcFormatHandle *pqc_format_from_bytes(const unsigned char *data, uintptr_t len);
uint16_t pqc_format_get_algorithm_id(const struct PqcFormatHandle *handle);
char *pqc_format_get_algorithm_name(const struct PqcFormatHandle *handle);
struct ByteBuffer pqc_format_get_data(const struct PqcFormatHandle *handle);
int pqc_format_validate(const struct PqcFormatHandle *handle);
uintptr_t pqc_format_get_total_size(const struct PqcFormatHandle *handle);
void pqc_format_free(struct PqcFormatHandle *handle);
char *pqc_get_version(void);
uint8_t pqc_get_binary_version(void);
#ifdef __cplusplus
} #endif
#endif