- Major type rewrite of int to size_t for most variables and arguments used for buffer lengths and loops

This commit is contained in:
Paul Bakker 2011-04-24 08:57:21 +00:00
parent 1be81a4e5f
commit 23986e5d5d
67 changed files with 1041 additions and 949 deletions

View file

@ -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