1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
pub const OQS_VERSION_TEXT: &'static [u8; 6usize] = b"0.4.0\0";
pub const OQS_COMPILE_BUILD_TARGET: &'static [u8; 28usize] = b"x86_64-Linux-5.3.0-1023-aws\0";
pub const OQS_PORTABLE_BUILD: u32 = 1;
pub const OQS_USE_OPENSSL: u32 = 1;
pub const OQS_USE_AES_OPENSSL: u32 = 1;
pub const OQS_USE_SHA2_OPENSSL: u32 = 1;
pub const OQS_USE_SHA3_OPENSSL: u32 = 1;
pub const OQS_USE_CPU_EXTENSIONS: u32 = 1;
pub const OQS_USE_AES_INSTRUCTIONS: u32 = 1;
pub const OQS_USE_AVX_INSTRUCTIONS: u32 = 1;
pub const OQS_USE_AVX2_INSTRUCTIONS: u32 = 1;
pub const OQS_USE_BMI_INSTRUCTIONS: u32 = 1;
pub const OQS_USE_BMI2_INSTRUCTIONS: u32 = 1;
pub const OQS_USE_POPCNT_INSTRUCTIONS: u32 = 1;
pub const OQS_USE_SSE_INSTRUCTIONS: u32 = 1;
pub const OQS_USE_SSE2_INSTRUCTIONS: u32 = 1;
pub const OQS_USE_SSE3_INSTRUCTIONS: u32 = 1;
pub const OQS_ENABLE_KEM_BIKE: u32 = 1;
pub const OQS_ENABLE_KEM_bike1_l1_cpa: u32 = 1;
pub const OQS_ENABLE_KEM_bike1_l3_cpa: u32 = 1;
pub const OQS_ENABLE_KEM_bike1_l1_fo: u32 = 1;
pub const OQS_ENABLE_KEM_bike1_l3_fo: u32 = 1;
pub const OQS_ENABLE_KEM_FRODOKEM: u32 = 1;
pub const OQS_ENABLE_KEM_frodokem_640_aes: u32 = 1;
pub const OQS_ENABLE_KEM_frodokem_640_shake: u32 = 1;
pub const OQS_ENABLE_KEM_frodokem_976_aes: u32 = 1;
pub const OQS_ENABLE_KEM_frodokem_976_shake: u32 = 1;
pub const OQS_ENABLE_KEM_frodokem_1344_aes: u32 = 1;
pub const OQS_ENABLE_KEM_frodokem_1344_shake: u32 = 1;
pub const OQS_ENABLE_KEM_SIDH: u32 = 1;
pub const OQS_ENABLE_KEM_sidh_p434: u32 = 1;
pub const OQS_ENABLE_KEM_sidh_p434_compressed: u32 = 1;
pub const OQS_ENABLE_KEM_sidh_p503: u32 = 1;
pub const OQS_ENABLE_KEM_sidh_p503_compressed: u32 = 1;
pub const OQS_ENABLE_KEM_sidh_p610: u32 = 1;
pub const OQS_ENABLE_KEM_sidh_p610_compressed: u32 = 1;
pub const OQS_ENABLE_KEM_sidh_p751: u32 = 1;
pub const OQS_ENABLE_KEM_sidh_p751_compressed: u32 = 1;
pub const OQS_ENABLE_KEM_SIKE: u32 = 1;
pub const OQS_ENABLE_KEM_sike_p434: u32 = 1;
pub const OQS_ENABLE_KEM_sike_p434_compressed: u32 = 1;
pub const OQS_ENABLE_KEM_sike_p503: u32 = 1;
pub const OQS_ENABLE_KEM_sike_p503_compressed: u32 = 1;
pub const OQS_ENABLE_KEM_sike_p610: u32 = 1;
pub const OQS_ENABLE_KEM_sike_p610_compressed: u32 = 1;
pub const OQS_ENABLE_KEM_sike_p751: u32 = 1;
pub const OQS_ENABLE_KEM_sike_p751_compressed: u32 = 1;
pub const OQS_ENABLE_SIG_PICNIC: u32 = 1;
pub const OQS_ENABLE_SIG_picnic_L1_UR: u32 = 1;
pub const OQS_ENABLE_SIG_picnic_L1_FS: u32 = 1;
pub const OQS_ENABLE_SIG_picnic_L1_full: u32 = 1;
pub const OQS_ENABLE_SIG_picnic_L3_UR: u32 = 1;
pub const OQS_ENABLE_SIG_picnic_L3_FS: u32 = 1;
pub const OQS_ENABLE_SIG_picnic_L3_full: u32 = 1;
pub const OQS_ENABLE_SIG_picnic_L5_UR: u32 = 1;
pub const OQS_ENABLE_SIG_picnic_L5_FS: u32 = 1;
pub const OQS_ENABLE_SIG_picnic_L5_full: u32 = 1;
pub const OQS_ENABLE_SIG_picnic3_L1: u32 = 1;
pub const OQS_ENABLE_SIG_picnic3_L3: u32 = 1;
pub const OQS_ENABLE_SIG_picnic3_L5: u32 = 1;
pub const OQS_ENABLE_KEM_CLASSIC_MCELIECE: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_348864: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_348864f: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_460896: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_460896f: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_6688128: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_6688128f: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_6960119: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_6960119f: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_8192128: u32 = 1;
pub const OQS_ENABLE_KEM_classic_mceliece_8192128f: u32 = 1;
pub const OQS_ENABLE_KEM_HQC: u32 = 1;
pub const OQS_ENABLE_KEM_hqc_128_1_cca2: u32 = 1;
pub const OQS_ENABLE_KEM_hqc_192_1_cca2: u32 = 1;
pub const OQS_ENABLE_KEM_hqc_192_2_cca2: u32 = 1;
pub const OQS_ENABLE_KEM_hqc_256_1_cca2: u32 = 1;
pub const OQS_ENABLE_KEM_hqc_256_2_cca2: u32 = 1;
pub const OQS_ENABLE_KEM_hqc_256_3_cca2: u32 = 1;
pub const OQS_ENABLE_KEM_KYBER: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_512: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_512_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_768: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_768_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_1024: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_1024_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_512_90s: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_512_90s_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_768_90s: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_768_90s_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_1024_90s: u32 = 1;
pub const OQS_ENABLE_KEM_kyber_1024_90s_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_NTRU: u32 = 1;
pub const OQS_ENABLE_KEM_ntru_hps2048509: u32 = 1;
pub const OQS_ENABLE_KEM_ntru_hps2048509_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_ntru_hps2048677: u32 = 1;
pub const OQS_ENABLE_KEM_ntru_hps2048677_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_ntru_hps4096821: u32 = 1;
pub const OQS_ENABLE_KEM_ntru_hps4096821_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_ntru_hrss701: u32 = 1;
pub const OQS_ENABLE_KEM_ntru_hrss701_avx2: u32 = 1;
pub const OQS_ENABLE_KEM_SABER: u32 = 1;
pub const OQS_ENABLE_KEM_saber_lightsaber: u32 = 1;
pub const OQS_ENABLE_KEM_saber_saber: u32 = 1;
pub const OQS_ENABLE_KEM_saber_firesaber: u32 = 1;
pub const OQS_ENABLE_SIG_DILITHIUM: u32 = 1;
pub const OQS_ENABLE_SIG_dilithium_2: u32 = 1;
pub const OQS_ENABLE_SIG_dilithium_2_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_dilithium_3: u32 = 1;
pub const OQS_ENABLE_SIG_dilithium_3_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_dilithium_4: u32 = 1;
pub const OQS_ENABLE_SIG_dilithium_4_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_FALCON: u32 = 1;
pub const OQS_ENABLE_SIG_falcon_512: u32 = 1;
pub const OQS_ENABLE_SIG_falcon_1024: u32 = 1;
pub const OQS_ENABLE_SIG_RAINBOW: u32 = 1;
pub const OQS_ENABLE_SIG_rainbow_Ia_classic: u32 = 1;
pub const OQS_ENABLE_SIG_rainbow_Ia_cyclic: u32 = 1;
pub const OQS_ENABLE_SIG_rainbow_Ia_cyclic_compressed: u32 = 1;
pub const OQS_ENABLE_SIG_rainbow_IIIc_classic: u32 = 1;
pub const OQS_ENABLE_SIG_rainbow_IIIc_cyclic: u32 = 1;
pub const OQS_ENABLE_SIG_rainbow_IIIc_cyclic_compressed: u32 = 1;
pub const OQS_ENABLE_SIG_rainbow_Vc_classic: u32 = 1;
pub const OQS_ENABLE_SIG_rainbow_Vc_cyclic: u32 = 1;
pub const OQS_ENABLE_SIG_rainbow_Vc_cyclic_compressed: u32 = 1;
pub const OQS_ENABLE_SIG_SPHINCS: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_128f_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_128f_robust_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_128f_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_128f_simple_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_128s_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_128s_robust_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_128s_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_128s_simple_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_192f_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_192f_robust_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_192f_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_192f_simple_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_192s_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_192s_robust_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_192s_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_192s_simple_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_256f_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_256f_robust_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_256f_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_256f_simple_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_256s_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_256s_robust_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_256s_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_haraka_256s_simple_aesni: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_128f_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_128f_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_128f_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_128f_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_128s_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_128s_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_128s_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_128s_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_192f_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_192f_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_192f_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_192f_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_192s_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_192s_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_192s_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_192s_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_256f_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_256f_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_256f_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_256f_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_256s_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_256s_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_256s_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_sha256_256s_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_128f_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_128f_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_128f_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_128f_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_128s_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_128s_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_128s_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_128s_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_192f_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_192f_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_192f_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_192f_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_192s_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_192s_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_192s_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_192s_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_256f_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_256f_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_256f_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_256f_simple_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_256s_robust: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_256s_robust_avx2: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_256s_simple: u32 = 1;
pub const OQS_ENABLE_SIG_sphincs_shake256_256s_simple_avx2: u32 = 1;
#[repr(i32)]
#[doc = " Represents return values from functions."]
#[doc = ""]
#[doc = " Callers should compare with the symbol rather than the individual value."]
#[doc = " For example,"]
#[doc = ""]
#[doc = " ret = OQS_KEM_encaps(...);"]
#[doc = " if (ret == OQS_SUCCESS) { ... }"]
#[doc = ""]
#[doc = " rather than"]
#[doc = ""]
#[doc = " if (!OQS_KEM_encaps(...) { ... }"]
#[doc = ""]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum OQS_STATUS {
#[doc = " Used to indicate that some undefined error occurred."]
OQS_ERROR = -1,
#[doc = " Used to indicate successful return from function."]
OQS_SUCCESS = 0,
#[doc = " Used to indicate failures in external libraries (e.g., OpenSSL)."]
OQS_EXTERNAL_LIB_ERROR_OPENSSL = 50,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct OQS_CPU_EXTENSIONS {
pub AES_ENABLED: ::std::os::raw::c_uint,
pub AVX_ENABLED: ::std::os::raw::c_uint,
pub AVX2_ENABLED: ::std::os::raw::c_uint,
pub AVX512_ENABLED: ::std::os::raw::c_uint,
pub BMI_ENABLED: ::std::os::raw::c_uint,
pub BMI2_ENABLED: ::std::os::raw::c_uint,
pub POPCNT_ENABLED: ::std::os::raw::c_uint,
pub SSE_ENABLED: ::std::os::raw::c_uint,
pub SSE2_ENABLED: ::std::os::raw::c_uint,
pub SSE3_ENABLED: ::std::os::raw::c_uint,
}
#[test]
fn bindgen_test_layout_OQS_CPU_EXTENSIONS() {
assert_eq!(
::std::mem::size_of::<OQS_CPU_EXTENSIONS>(),
40usize,
concat!("Size of: ", stringify!(OQS_CPU_EXTENSIONS))
);
assert_eq!(
::std::mem::align_of::<OQS_CPU_EXTENSIONS>(),
4usize,
concat!("Alignment of ", stringify!(OQS_CPU_EXTENSIONS))
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).AES_ENABLED as *const _ as usize },
0usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(AES_ENABLED)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).AVX_ENABLED as *const _ as usize },
4usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(AVX_ENABLED)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).AVX2_ENABLED as *const _ as usize },
8usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(AVX2_ENABLED)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).AVX512_ENABLED as *const _ as usize
},
12usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(AVX512_ENABLED)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).BMI_ENABLED as *const _ as usize },
16usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(BMI_ENABLED)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).BMI2_ENABLED as *const _ as usize },
20usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(BMI2_ENABLED)
)
);
assert_eq!(
unsafe {
&(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).POPCNT_ENABLED as *const _ as usize
},
24usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(POPCNT_ENABLED)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).SSE_ENABLED as *const _ as usize },
28usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(SSE_ENABLED)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).SSE2_ENABLED as *const _ as usize },
32usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(SSE2_ENABLED)
)
);
assert_eq!(
unsafe { &(*(::std::ptr::null::<OQS_CPU_EXTENSIONS>())).SSE3_ENABLED as *const _ as usize },
36usize,
concat!(
"Offset of field: ",
stringify!(OQS_CPU_EXTENSIONS),
"::",
stringify!(SSE3_ENABLED)
)
);
}
extern "C" {
#[doc = " Returns a list of available CPU extensions."]
#[doc = ""]
#[doc = " \\return Struct of type OQS_CPU_EXTENSIONS containing flags for runtime CPU extension detection."]
pub fn OQS_get_available_CPU_extensions() -> OQS_CPU_EXTENSIONS;
}
extern "C" {
#[doc = " Returns name of available CPU extension."]
#[doc = ""]
#[doc = " \\return name of extension indexed by struct entry number"]
pub fn OQS_get_cpu_extension_name(i: ::std::os::raw::c_uint) -> *const ::std::os::raw::c_char;
}
extern "C" {
#[doc = " This currently only sets the values in the OQS_CPU_EXTENSIONS,"]
#[doc = " and so has effect only when OQS_USE_CPU_EXTENSIONS and"]
#[doc = " OQS_PORTABLE_BUILD are set."]
pub fn OQS_init();
}
extern "C" {
#[doc = " Zeros out `len` bytes of memory starting at `ptr`."]
#[doc = ""]
#[doc = " Designed to be protected against optimizing compilers which try to remove"]
#[doc = " \"unnecessary\" operations. Should be used for all buffers containing secret"]
#[doc = " data."]
#[doc = ""]
#[doc = " @param[in] ptr The start of the memory to zero out."]
#[doc = " @param[in] len The number of bytes to zero out."]
pub fn OQS_MEM_cleanse(ptr: *mut ::std::os::raw::c_void, len: usize);
}
extern "C" {
#[doc = " Zeros out `len` bytes of memory starting at `ptr`, then frees `ptr`."]
#[doc = ""]
#[doc = " Can be called with `ptr = NULL`, in which case no operation is performed."]
#[doc = ""]
#[doc = " Designed to be protected against optimizing compilers which try to remove"]
#[doc = " \"unnecessary\" operations. Should be used for all buffers containing secret"]
#[doc = " data."]
#[doc = ""]
#[doc = " @param[in] ptr The start of the memory to zero out and free."]
#[doc = " @param[in] len The number of bytes to zero out."]
pub fn OQS_MEM_secure_free(ptr: *mut ::std::os::raw::c_void, len: usize);
}
extern "C" {
#[doc = " Frees `ptr`."]
#[doc = ""]
#[doc = " Can be called with `ptr = NULL`, in which case no operation is performed."]
#[doc = ""]
#[doc = " Should only be used on non-secret data."]
#[doc = ""]
#[doc = " @param[in] ptr The start of the memory to free."]
pub fn OQS_MEM_insecure_free(ptr: *mut ::std::os::raw::c_void);
}