aboutsummaryrefslogtreecommitdiff
path: root/include/polarssl/base64.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/polarssl/base64.h')
-rw-r--r--include/polarssl/base64.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/polarssl/base64.h b/include/polarssl/base64.h
index 1c6498c..27ba685 100644
--- a/include/polarssl/base64.h
+++ b/include/polarssl/base64.h
@@ -27,6 +27,8 @@
#ifndef POLARSSL_BASE64_H
#define POLARSSL_BASE64_H
+#include <string.h>
+
#define POLARSSL_ERR_BASE64_BUFFER_TOO_SMALL 0x0010
#define POLARSSL_ERR_BASE64_INVALID_CHARACTER 0x0012
@@ -49,8 +51,8 @@ extern "C" {
* \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
@@ -68,8 +70,8 @@ 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 );
/**
* \brief Checkup routine