diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2021-09-27 11:02:56 +0200 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2021-09-27 11:02:56 +0200 |
commit | 7ecc3a03a0670a1620c603502c9958b95e6dc1d0 (patch) | |
tree | 69d76fd05cbf0facae18b99b526c16426bf9b1c6 /src/messenger/messenger_api_message.h | |
parent | 1fef34e55a00816bdb237e87ff14d54e6575f763 (diff) | |
download | gnunet-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.h | 37 |
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 | */ |
109 | void | 109 | void |
110 | encode_message (const struct GNUNET_MESSENGER_Message *message, uint16_t length, char *buffer, | 110 | encode_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 | */ |
127 | int | 129 | int |
128 | decode_message (struct GNUNET_MESSENGER_Message *message, uint16_t length, const char *buffer, | 130 | decode_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 | */ |
140 | void | 145 | void |
141 | hash_message (const struct GNUNET_MESSENGER_Message *message, uint16_t length, const char *buffer, | 146 | hash_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 | */ |
154 | void | 161 | void |
155 | sign_message (struct GNUNET_MESSENGER_Message *message, uint16_t length, char *buffer, | 162 | sign_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 | */ |
168 | int | 178 | int |
169 | verify_message (const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash, | 179 | verify_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 | */ |
181 | int | 192 | int |
182 | encrypt_message (struct GNUNET_MESSENGER_Message *message, const struct GNUNET_IDENTITY_PublicKey *key); | 193 | encrypt_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 | */ |
193 | int | 205 | int |
194 | decrypt_message (struct GNUNET_MESSENGER_Message *message, const struct GNUNET_IDENTITY_PrivateKey *key); | 206 | decrypt_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 | */ |
211 | struct GNUNET_MQ_Envelope* | 224 | struct GNUNET_MQ_Envelope* |
212 | pack_message (struct GNUNET_MESSENGER_Message *message, struct GNUNET_HashCode *hash, | 225 | pack_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 |