aboutsummaryrefslogtreecommitdiff
path: root/src/credential/credential_serialization.h
diff options
context:
space:
mode:
authorSchanzenbach, Martin <mschanzenbach@posteo.de>2016-12-18 16:52:59 +0100
committerSchanzenbach, Martin <mschanzenbach@posteo.de>2016-12-18 16:52:59 +0100
commit33e847bf4edc06be68589467d0f6a31c07d911ac (patch)
treed635352dbea2aa448395d52703351ec8c7242fe4 /src/credential/credential_serialization.h
parent9c5ecc381458c941fdb70f1f4a47e76daac4eda5 (diff)
downloadgnunet-33e847bf4edc06be68589467d0f6a31c07d911ac.tar.gz
gnunet-33e847bf4edc06be68589467d0f6a31c07d911ac.zip
-fixes
Diffstat (limited to 'src/credential/credential_serialization.h')
-rw-r--r--src/credential/credential_serialization.h20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/credential/credential_serialization.h b/src/credential/credential_serialization.h
index 39ac0103b..eb1327f34 100644
--- a/src/credential/credential_serialization.h
+++ b/src/credential/credential_serialization.h
@@ -25,6 +25,9 @@
25 * and credentials 25 * and credentials
26 * @author Martin Schanzenbach 26 * @author Martin Schanzenbach
27 */ 27 */
28#ifndef CREDENTIAL_SERIALIZATION_H
29#define CREDENTIAL_SERIALIZATION_H
30
28#include "platform.h" 31#include "platform.h"
29#include "gnunet_util_lib.h" 32#include "gnunet_util_lib.h"
30#include "gnunet_constants.h" 33#include "gnunet_constants.h"
@@ -40,7 +43,7 @@
40 */ 43 */
41size_t 44size_t
42GNUNET_CREDENTIAL_delegation_set_get_size (unsigned int ds_count, 45GNUNET_CREDENTIAL_delegation_set_get_size (unsigned int ds_count,
43 const struct GNUNET_CREDENTIAL_DelegationSetRecord *dsr); 46 const struct GNUNET_CREDENTIAL_DelegationSet *dsr);
44 47
45/** 48/**
46 * Serizalize the given delegation record entries 49 * Serizalize the given delegation record entries
@@ -53,7 +56,7 @@ GNUNET_CREDENTIAL_delegation_set_get_size (unsigned int ds_count,
53 */ 56 */
54ssize_t 57ssize_t
55GNUNET_CREDENTIAL_delegation_set_serialize (unsigned int d_count, 58GNUNET_CREDENTIAL_delegation_set_serialize (unsigned int d_count,
56 const struct GNUNET_CREDENTIAL_DelegationSetRecord *dsr, 59 const struct GNUNET_CREDENTIAL_DelegationSet *dsr,
57 size_t dest_size, 60 size_t dest_size,
58 char *dest); 61 char *dest);
59 62
@@ -71,7 +74,7 @@ int
71GNUNET_CREDENTIAL_delegation_set_deserialize (size_t len, 74GNUNET_CREDENTIAL_delegation_set_deserialize (size_t len,
72 const char *src, 75 const char *src,
73 unsigned int d_count, 76 unsigned int d_count,
74 struct GNUNET_CREDENTIAL_DelegationSetRecord *dsr); 77 struct GNUNET_CREDENTIAL_DelegationSet *dsr);
75 78
76 /** 79 /**
77 * Calculate how many bytes we will need to serialize 80 * Calculate how many bytes we will need to serialize
@@ -127,4 +130,13 @@ GNUNET_CREDENTIAL_delegation_set_deserialize (size_t len,
127 struct GNUNET_CREDENTIAL_Delegation *dd, 130 struct GNUNET_CREDENTIAL_Delegation *dd,
128 unsigned int c_count, 131 unsigned int c_count,
129 struct GNUNET_CREDENTIAL_Credential *cd); 132 struct GNUNET_CREDENTIAL_Credential *cd);
130 /* end of credential_serialization.h */ 133
134int
135GNUNET_CREDENTIAL_credential_serialize (struct GNUNET_CREDENTIAL_Credential *cred,
136 char **data);
137
138struct GNUNET_CREDENTIAL_Credential*
139GNUNET_CREDENTIAL_credential_deserialize (const char* data,
140 size_t data_size);
141#endif
142/* end of credential_serialization.h */