summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/base64.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/base64.h')
-rw-r--r--lib/libalpm/base64.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/libalpm/base64.h b/lib/libalpm/base64.h
index 0ae9612c..406aefa1 100644
--- a/lib/libalpm/base64.h
+++ b/lib/libalpm/base64.h
@@ -25,8 +25,10 @@
#ifndef _BASE64_H
#define _BASE64_H
-#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL 0x0010
-#define POLARSSL_ERR_BASE64_INVALID_CHARACTER 0x0012
+#include <string.h>
+
+#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL -0x0010 /**< Output buffer too small. */
+#define POLARSSL_ERR_BASE64_INVALID_CHARACTER -0x0012 /**< Invalid character in input. */
/**
* \brief Encode a buffer into base64 format
@@ -43,8 +45,8 @@
* \note Call this function with *dlen = 0 to obtain the
* required buffer size in *dlen
*/
-int base64_encode( unsigned char *dst, int *dlen,
- const unsigned char *src, int slen );
+int base64_encode( unsigned char *dst, size_t *dlen,
+ const unsigned char *src, size_t slen );
/**
* \brief Decode a base64-formatted buffer
@@ -62,7 +64,7 @@ int base64_encode( unsigned char *dst, int *dlen,
* \note Call this function with *dlen = 0 to obtain the
* required buffer size in *dlen
*/
-int base64_decode( unsigned char *dst, int *dlen,
- const unsigned char *src, int slen );
+int base64_decode( unsigned char *dst, size_t *dlen,
+ const unsigned char *src, size_t slen );
#endif /* base64.h */