Don't use assertions to check application-provided arguments;
[oweals/openssl.git] / crypto / ripemd / ripemd.h
index 67a94555f7ff84735c6112107c0f87eac1880d03..033a5965b58db1ad71c1fb4ddeac275ec80e204e 100644 (file)
@@ -60,6 +60,7 @@
 #define HEADER_RIPEMD_H
 
 #include <openssl/e_os2.h>
+#include <stddef.h>
 
 #ifdef  __cplusplus
 extern "C" {
@@ -87,13 +88,13 @@ typedef struct RIPEMD160state_st
        RIPEMD160_LONG A,B,C,D,E;
        RIPEMD160_LONG Nl,Nh;
        RIPEMD160_LONG data[RIPEMD160_LBLOCK];
-       int num;
+       unsigned int   num;
        } RIPEMD160_CTX;
 
-void RIPEMD160_Init(RIPEMD160_CTX *c);
-void RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, unsigned long len);
-void RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
-unsigned char *RIPEMD160(const unsigned char *d, unsigned long n,
+int RIPEMD160_Init(RIPEMD160_CTX *c);
+int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len);
+int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
+unsigned char *RIPEMD160(const unsigned char *d, size_t n,
        unsigned char *md);
 void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b);
 #ifdef  __cplusplus