Added mechanism to provide alternative cipher / hash implementations

All symmetric cipher algorithms and hash algorithms now include support
for a POLARSSL_XXX_ALT flag that prevents the definition of the
algorithm context structure and all 'core' functions.
This commit is contained in:
Paul Bakker 2013-06-12 16:49:10 +02:00
parent 9691bbe9b3
commit 4087c47043
27 changed files with 331 additions and 34 deletions

View file

@ -1,7 +1,7 @@
/*
* FIPS-46-3 compliant Triple-DES implementation
*
* Copyright (C) 2006-2010, Brainspark B.V.
* Copyright (C) 2006-2013, Brainspark B.V.
*
* This file is part of PolarSSL (http://www.polarssl.org)
* Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
@ -35,6 +35,8 @@
#include "polarssl/des.h"
#if !defined(POLARSSL_DES_ALT)
/*
* 32-bit integer manipulation macros (big endian)
*/
@ -751,6 +753,8 @@ int des3_crypt_cbc( des3_context *ctx,
return( 0 );
}
#endif /* !POLARSSL_DES_ALT */
#if defined(POLARSSL_SELF_TEST)
#include <stdio.h>