2
0

Fix some build warnings.

This commit is contained in:
Maarten Billemont
2017-08-06 18:56:37 -04:00
parent 68d1ab58b7
commit 18daef7808
5 changed files with 72 additions and 92 deletions

View File

@@ -62,18 +62,17 @@
*/
size_t mpw_base64_decode_max(const char *b64Text);
/** Decodes a base-64 encoded string into a plain byte buffer.
* @param plainMax the maximum amount of bytes to write to plainBuf.
* @return The amount of bytes that were written to plainBuf or -1 if this amount would have exceeded plainMax.
* @param plainBuf a byte buffer, size should be at least mpw_base64_decode_max(b64Text)
* @return The amount of bytes that were written to plainBuf.
*/
int mpw_base64_decode(uint8_t *plainBuf, size_t plainMax, const char *b64Text);
int mpw_base64_decode(uint8_t *plainBuf, const char *b64Text);
/**
* @return The amount of characters needed to encode a plainBuf of the given size as base-64 (excluding the terminating NUL).
*/
size_t mpw_base64_encode_max(size_t plainSize);
/** Encodes a plain byte buffer into a base-64 encoded string.
* @param b64Max the maximum amount of characters to write to b64Text, excluding the terminating NUL.
* @return The amount of characters that were written to b64Text, excluding the terminating NUL
* or -1 if this amount would have exceeded b64Max.
* @param b64Text a character buffer, size should be at least mpw_base64_encode_max(plainSize) + 1
* @return The amount of characters that were written to b64Text, excluding the terminating NUL.
*/
int mpw_base64_encode(char *b64Text, size_t b64Max, const uint8_t *plainBuf, size_t plainSize);
int mpw_base64_encode(char *b64Text, const uint8_t *plainBuf, size_t plainSize);