aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/messenger_api_message.h
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2021-09-27 11:02:56 +0200
committerTheJackiMonster <thejackimonster@gmail.com>2021-09-27 11:02:56 +0200
commit7ecc3a03a0670a1620c603502c9958b95e6dc1d0 (patch)
tree69d76fd05cbf0facae18b99b526c16426bf9b1c6 /src/messenger/messenger_api_message.h
parent1fef34e55a00816bdb237e87ff14d54e6575f763 (diff)
downloadgnunet-7ecc3a03a0670a1620c603502c9958b95e6dc1d0.tar.gz
gnunet-7ecc3a03a0670a1620c603502c9958b95e6dc1d0.zip
-indentation of parameters
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/messenger/messenger_api_message.h')
-rw-r--r--src/messenger/messenger_api_message.h37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/messenger/messenger_api_message.h b/src/messenger/messenger_api_message.h
index 7ce30dc92..6aebf4014 100644
--- a/src/messenger/messenger_api_message.h
+++ b/src/messenger/messenger_api_message.h
@@ -107,7 +107,9 @@ get_message_size (const struct GNUNET_MESSENGER_Message *message,
107 * @param[in] encode_signature Flag to include signature 107 * @param[in] encode_signature Flag to include signature
108 */ 108 */
109void 109void
110encode_message (const struct GNUNET_MESSENGER_Message *message, uint16_t length, char *buffer, 110encode_message (const struct GNUNET_MESSENGER_Message *message,
111 uint16_t length,
112 char *buffer,
111 int include_signature); 113 int include_signature);
112 114
113/** 115/**
@@ -125,8 +127,11 @@ encode_message (const struct GNUNET_MESSENGER_Message *message, uint16_t length,
125 * @return #GNUNET_YES on success, otherwise #GNUNET_NO 127 * @return #GNUNET_YES on success, otherwise #GNUNET_NO
126 */ 128 */
127int 129int
128decode_message (struct GNUNET_MESSENGER_Message *message, uint16_t length, const char *buffer, 130decode_message (struct GNUNET_MESSENGER_Message *message,
129 int include_signature, uint16_t *padding); 131 uint16_t length,
132 const char *buffer,
133 int include_signature,
134 uint16_t *padding);
130 135
131/** 136/**
132 * Calculates a <i>hash</i> of a given <i>buffer</i> with a <i>length</i> in bytes 137 * Calculates a <i>hash</i> of a given <i>buffer</i> with a <i>length</i> in bytes
@@ -138,7 +143,9 @@ decode_message (struct GNUNET_MESSENGER_Message *message, uint16_t length, const
138 * @param[out] hash Hash 143 * @param[out] hash Hash
139 */ 144 */
140void 145void
141hash_message (const struct GNUNET_MESSENGER_Message *message, uint16_t length, const char *buffer, 146hash_message (const struct GNUNET_MESSENGER_Message *message,
147 uint16_t length,
148 const char *buffer,
142 struct GNUNET_HashCode *hash); 149 struct GNUNET_HashCode *hash);
143 150
144/** 151/**
@@ -152,8 +159,11 @@ hash_message (const struct GNUNET_MESSENGER_Message *message, uint16_t length, c
152 * @param[in] ego EGO 159 * @param[in] ego EGO
153 */ 160 */
154void 161void
155sign_message (struct GNUNET_MESSENGER_Message *message, uint16_t length, char *buffer, 162sign_message (struct GNUNET_MESSENGER_Message *message,
156 const struct GNUNET_HashCode *hash, const struct GNUNET_MESSENGER_Ego *ego); 163 uint16_t length,
164 char *buffer,
165 const struct GNUNET_HashCode *hash,
166 const struct GNUNET_MESSENGER_Ego *ego);
157 167
158/** 168/**
159 * Verifies the signature of a given <i>message</i> and its <i>hash</i> with a specific 169 * Verifies the signature of a given <i>message</i> and its <i>hash</i> with a specific
@@ -166,7 +176,8 @@ sign_message (struct GNUNET_MESSENGER_Message *message, uint16_t length, char *b
166 * @return #GNUNET_OK on success, otherwise #GNUNET_SYSERR 176 * @return #GNUNET_OK on success, otherwise #GNUNET_SYSERR
167 */ 177 */
168int 178int
169verify_message (const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash, 179verify_message (const struct GNUNET_MESSENGER_Message *message,
180 const struct GNUNET_HashCode *hash,
170 const struct GNUNET_IDENTITY_PublicKey *key); 181 const struct GNUNET_IDENTITY_PublicKey *key);
171 182
172/** 183/**
@@ -179,7 +190,8 @@ verify_message (const struct GNUNET_MESSENGER_Message *message, const struct GNU
179 * @return #GNUNET_YES on success, otherwise #GNUNET_NO 190 * @return #GNUNET_YES on success, otherwise #GNUNET_NO
180 */ 191 */
181int 192int
182encrypt_message (struct GNUNET_MESSENGER_Message *message, const struct GNUNET_IDENTITY_PublicKey *key); 193encrypt_message (struct GNUNET_MESSENGER_Message *message,
194 const struct GNUNET_IDENTITY_PublicKey *key);
183 195
184/** 196/**
185 * Decrypts a private <i>message</i> using a given private <i>key</i> and replaces its body 197 * Decrypts a private <i>message</i> using a given private <i>key</i> and replaces its body
@@ -191,7 +203,8 @@ encrypt_message (struct GNUNET_MESSENGER_Message *message, const struct GNUNET_I
191 * @return #GNUNET_YES on success, otherwise #GNUNET_NO 203 * @return #GNUNET_YES on success, otherwise #GNUNET_NO
192 */ 204 */
193int 205int
194decrypt_message (struct GNUNET_MESSENGER_Message *message, const struct GNUNET_IDENTITY_PrivateKey *key); 206decrypt_message (struct GNUNET_MESSENGER_Message *message,
207 const struct GNUNET_IDENTITY_PrivateKey *key);
195 208
196#define GNUNET_MESSENGER_PACK_MODE_ENVELOPE 0x1 209#define GNUNET_MESSENGER_PACK_MODE_ENVELOPE 0x1
197#define GNUNET_MESSENGER_PACK_MODE_UNKNOWN 0x0 210#define GNUNET_MESSENGER_PACK_MODE_UNKNOWN 0x0
@@ -209,8 +222,10 @@ decrypt_message (struct GNUNET_MESSENGER_Message *message, const struct GNUNET_I
209 * @return Envelope or NULL 222 * @return Envelope or NULL
210 */ 223 */
211struct GNUNET_MQ_Envelope* 224struct GNUNET_MQ_Envelope*
212pack_message (struct GNUNET_MESSENGER_Message *message, struct GNUNET_HashCode *hash, 225pack_message (struct GNUNET_MESSENGER_Message *message,
213 const struct GNUNET_MESSENGER_Ego *ego, int mode); 226 struct GNUNET_HashCode *hash,
227 const struct GNUNET_MESSENGER_Ego *ego,
228 int mode);
214 229
215/** 230/**
216 * Returns if a specific kind of message should be sent by a client. The function returns 231 * Returns if a specific kind of message should be sent by a client. The function returns