-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibfenc_ciphertext.h
52 lines (43 loc) · 1.57 KB
/
libfenc_ciphertext.h
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
/*! \file libfenc_ciphertext.h
*
* \brief .
*
* Copyright 2009 Matthew Green. All rights reserved.
*/
#ifndef __LIBFENC_CIPHERTEXT_H__
#define __LIBFENC_CIPHERTEXT_H__
#include "libfenc.h"
/*!
* Serialize a .
*
* @param param_buf Buffer containing parameters
* @return FENC_ERROR_NONE or an error code.
*/
FENC_ERROR libfenc_setup_from_pbc_params(fenc_group_params *group_params, char *param_buf, size_t param_len);
/*!
* Load parameters from file.
*
* @param group_params parameters data structure
* @param fp file pointer
* @return FENC_ERROR_NONE or an error code.
*/
FENC_ERROR libfenc_load_group_params_from_str(fenc_group_params *group_params, FILE *fp);
/*!
* Duplicate a group parameters structure. This will involve memory allocation for
* any internal structures; the duplicate structure must be destroyed to reclaim
* this memory. Caller must allocate the destination data structure.
*
* @param src_group_params Input group parameters.
* @param dest_group_params Pre-allocated buffer for the destination parameters.
* @return FENC_ERROR_NONE or an error code.
*/
FENC_ERROR libfenc_copy_group_params(fenc_group_params *src_group_params, fenc_group_params *dest_group_params);
/*!
* Destroy a group parameters structure. This will de-allocate internal data
* structures. It does not de-allocate the structure itself.
*
* @param group_params Group parameters.
* @return FENC_ERROR_NONE or an error code.
*/
FENC_ERROR libfenc_destroy_group_params(fenc_group_params *group_params);
#endif /* ifdef __LIBFENC_CIPHERTEXT_H__ */