PQLR
Postquantum Crypto Library by QAPP
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
alg.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <stdint.h>
4 
5 #define PQLR_ALG_UNKNOWN "unknown"
6 #define PQLR_ALG_ERROR -1
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif // __cplusplus
11 
12 #include <pqlr/common/api.h>
13 
20 #define PQLR_ALG_OPTION_ENABLE_HW_ACC 0x00000001u
21 #define PQLR_ALG_OPTION_ENABLE_PROXY 0x00000002u
22 
32 typedef struct pqlr_alg_st* pqlr_alg;
33 
44 PQLR_API pqlr_alg pqlr_alg_new(const char* alg_str);
45 
53 
62 PQLR_API const char* pqlr_alg_get_str(const pqlr_alg alg);
63 
73 
84 
97 PQLR_API int pqlr_alg_set_paramset(pqlr_alg alg, int paramset);
98 
110 PQLR_API int pqlr_alg_set_options(pqlr_alg alg, uint32_t options);
111 
122 
127 #ifdef __cplusplus
128 } // extern "C"
129 #endif //__cplusplus
#define PQLR_API
Definition: api.h:22
PQLR_API int pqlr_alg_num_paramsets(const pqlr_alg alg)
Gets available parameter sets for this algorithm. If the return value is n then all parameter sets fr...
PQLR_API int pqlr_alg_get_paramset(const pqlr_alg alg)
Gets parameter set configured for given algorithm instance.
struct pqlr_alg_st * pqlr_alg
PQLR algorithm instance handle.
Definition: alg.h:32
PQLR_API void pqlr_alg_set_defaults(pqlr_alg alg)
Configures the PQLR algorithm with default parameter and options set.
PQLR_API int pqlr_alg_set_paramset(pqlr_alg alg, int paramset)
Enables selected parameter set.
PQLR_API void pqlr_alg_free(pqlr_alg alg)
Frees pqlr_alg instance and all corresponding resources.
PQLR_API int pqlr_alg_set_options(pqlr_alg alg, uint32_t options)
Enables selected option.
PQLR_API const char * pqlr_alg_get_str(const pqlr_alg alg)
Gets a string with the name of PQLR algorithm.
PQLR_API pqlr_alg pqlr_alg_new(const char *alg_str)
Creates pqlr_alg instance.