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.
diff --git a/include/polarssl/des.h b/include/polarssl/des.h
index 5eee7ac..d78b568 100644
--- a/include/polarssl/des.h
+++ b/include/polarssl/des.h
@@ -3,7 +3,7 @@
  *
  * \brief DES block cipher
  *
- *  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>
@@ -27,6 +27,8 @@
 #ifndef POLARSSL_DES_H
 #define POLARSSL_DES_H
 
+#include "config.h"
+
 #include <string.h>
 
 #ifdef _MSC_VER
@@ -43,6 +45,10 @@
 
 #define DES_KEY_SIZE    8
 
+#if !defined(POLARSSL_DES_ALT)
+// Regular implementation
+//
+
 /**
  * \brief          DES context structure
  */
@@ -220,6 +226,18 @@
                      const unsigned char *input,
                      unsigned char *output );
 
+#ifdef __cplusplus
+}
+#endif
+
+#else  /* POLARSSL_DES_ALT */
+#include "des_alt.h"
+#endif /* POLARSSL_DES_ALT */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * \brief          Checkup routine
  *