Support alternative implementation for RIPEMD-160

(POLARSSL_RIPEMD160_ALT)
This commit is contained in:
Paul Bakker 2014-01-22 14:14:26 +01:00
parent 61b699ed1b
commit 9f4c162df1
2 changed files with 20 additions and 3 deletions

View file

@ -148,6 +148,7 @@
//#define POLARSSL_MD2_ALT
//#define POLARSSL_MD4_ALT
//#define POLARSSL_MD5_ALT
//#define POLARSSL_RIPEMD160_ALT
//#define POLARSSL_SHA1_ALT
//#define POLARSSL_SHA256_ALT
//#define POLARSSL_SHA512_ALT

View file

@ -40,6 +40,10 @@ typedef UINT32 uint32_t;
#define POLARSSL_ERR_RIPEMD160_FILE_IO_ERROR -0x0074 /**< Read/write error in file. */
#if !defined(POLARSSL_RIPEMD160_ALT)
// Regular implementation
//
#ifdef __cplusplus
extern "C" {
#endif
@ -83,6 +87,21 @@ void ripemd160_update( ripemd160_context *ctx,
*/
void ripemd160_finish( ripemd160_context *ctx, unsigned char output[20] );
/* Internal use */
void ripemd160_process( ripemd160_context *ctx, const unsigned char data[64] );
#ifdef __cplusplus
}
#endif
#else /* POLARSSL_RIPEMD160_ALT */
#include "ripemd160.h"
#endif /* POLARSSL_RIPEMD160_ALT */
#ifdef __cplusplus
extern "C" {
#endif
/**
* \brief Output = RIPEMD-160( input buffer )
*
@ -160,9 +179,6 @@ void ripemd160_hmac( const unsigned char *key, size_t keylen,
*/
int ripemd160_self_test( int verbose );
/* Internal use */
void ripemd160_process( ripemd160_context *ctx, const unsigned char data[64] );
#ifdef __cplusplus
}
#endif