summaryrefslogtreecommitdiff
path: root/plugins/MirOTR/Libgcrypt/cipher/camellia.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirOTR/Libgcrypt/cipher/camellia.h')
-rw-r--r--plugins/MirOTR/Libgcrypt/cipher/camellia.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/plugins/MirOTR/Libgcrypt/cipher/camellia.h b/plugins/MirOTR/Libgcrypt/cipher/camellia.h
index 4425a3a2bc..d0e3c18ed7 100644
--- a/plugins/MirOTR/Libgcrypt/cipher/camellia.h
+++ b/plugins/MirOTR/Libgcrypt/cipher/camellia.h
@@ -25,11 +25,18 @@
* space of the library clean. The following macro is thus useful:
*
* #define CAMELLIA_EXT_SYM_PREFIX foo_
- *
+ *
* This prefixes all external symbols with "foo_".
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
+/* USE_ARM_ASM indicates whether to use ARM assembly code. */
+# undef USE_ARM_ASM
+# if defined(__ARMEL__)
+# ifdef HAVE_COMPATIBLE_GCC_ARM_PLATFORM_AS
+# define USE_ARM_ASM 1
+# endif
+# endif
#endif
#ifdef CAMELLIA_EXT_SYM_PREFIX
#define CAMELLIA_PREFIX1(x,y) x ## y
@@ -43,7 +50,7 @@
#define camellia_encrypt128 CAMELLIA_PREFIX(camellia_encrypt128)
#define camellia_encrypt256 CAMELLIA_PREFIX(camellia_encrypt256)
#define camellia_setup128 CAMELLIA_PREFIX(camellia_setup128)
-#define camellia_setup192 CAMELLIA_PREFIX(camellia_setup192)
+#define camellia_setup192 CAMELLIA_PREFIX(camellia_setup192)
#define camellia_setup256 CAMELLIA_PREFIX(camellia_setup256)
#endif /*CAMELLIA_EXT_SYM_PREFIX*/
@@ -60,18 +67,20 @@ typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN];
void Camellia_Ekeygen(const int keyBitLength,
- const unsigned char *rawKey,
+ const unsigned char *rawKey,
KEY_TABLE_TYPE keyTable);
+#ifndef USE_ARM_ASM
void Camellia_EncryptBlock(const int keyBitLength,
- const unsigned char *plaintext,
- const KEY_TABLE_TYPE keyTable,
+ const unsigned char *plaintext,
+ const KEY_TABLE_TYPE keyTable,
unsigned char *cipherText);
-void Camellia_DecryptBlock(const int keyBitLength,
- const unsigned char *cipherText,
- const KEY_TABLE_TYPE keyTable,
+void Camellia_DecryptBlock(const int keyBitLength,
+ const unsigned char *cipherText,
+ const KEY_TABLE_TYPE keyTable,
unsigned char *plaintext);
+#endif /*!USE_ARMV6_ASM*/
#ifdef __cplusplus