summaryrefslogtreecommitdiff
path: root/lib/crypto/aes.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/crypto/aes.c')
-rw-r--r--lib/crypto/aes.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/crypto/aes.c b/lib/crypto/aes.c
index f7f96889c12..800a97ee705 100644
--- a/lib/crypto/aes.c
+++ b/lib/crypto/aes.c
@@ -32,9 +32,10 @@
*/
#include "replace.h"
+#include "aes.h"
+#ifdef SAMBA_RIJNDAEL
#include "rijndael-alg-fst.h"
-#include "aes.h"
int
AES_set_encrypt_key(const unsigned char *userkey, const int bits, AES_KEY *key)
@@ -65,7 +66,9 @@ AES_decrypt(const unsigned char *in, unsigned char *out, const AES_KEY *key)
{
rijndaelDecrypt(key->key, key->rounds, in, out);
}
+#endif /* SAMBA_RIJNDAEL */
+#ifdef SAMBA_AES_CBC_ENCRYPT
void
AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
unsigned long size, const AES_KEY *key,
@@ -112,7 +115,9 @@ AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
}
}
}
+#endif /* SAMBA_AES_CBC_ENCRYPT */
+#ifdef SAMBA_AES_CFB8_ENCRYPT
void
AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
unsigned long size, const AES_KEY *key,
@@ -135,3 +140,4 @@ AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
memcpy(iv, &tmp[1], AES_BLOCK_SIZE);
}
}
+#endif /* SAMBA_AES_CFB8_ENCRYPT */