summaryrefslogtreecommitdiff
path: root/crypto/tomcrypt_cipher.h
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2013-10-30 16:19:33 +0400
committerDmitry Kozlov <xeb@mail.ru>2013-10-30 16:19:44 +0400
commit286cbc87fff9344ff85db0efd54c41f619509c74 (patch)
tree6e356ee6a15835903b91ba869f7e953a7e5838c6 /crypto/tomcrypt_cipher.h
parent68b7256c31e4efcb613854d73571edcca13fcd6e (diff)
downloadaccel-ppp-286cbc87fff9344ff85db0efd54c41f619509c74.tar.gz
accel-ppp-286cbc87fff9344ff85db0efd54c41f619509c74.zip
fix build with internal & tomcrypt crypto libraries
Signed-off-by: Vladislav Grishenko <themiron@mail.ru>
Diffstat (limited to 'crypto/tomcrypt_cipher.h')
-rw-r--r--crypto/tomcrypt_cipher.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/tomcrypt_cipher.h b/crypto/tomcrypt_cipher.h
index dab5685e..c7bab4f3 100644
--- a/crypto/tomcrypt_cipher.h
+++ b/crypto/tomcrypt_cipher.h
@@ -91,11 +91,12 @@ struct rc2_key { unsigned xkey[64]; };
struct des_key {
ulong32 ek[32], dk[32];
};
-
+#ifdef LTC_DES3
struct des3_key {
ulong32 ek[3][32], dk[3][32];
};
#endif
+#endif
#ifdef LTC_CAST5
struct cast5_key {
@@ -141,10 +142,11 @@ struct multi2_key {
typedef union Symmetric_key {
#ifdef LTC_DES
struct des_key des;
+#ifdef LTC_DES3
struct des3_key des3;
#endif
+#endif
#ifdef LTC_RC2
- aa
struct rc2_key rc2;
#endif
#ifdef LTC_SAFER
@@ -667,13 +669,16 @@ int des_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *s
int des_test(void);
void des_done(symmetric_key *skey);
int des_keysize(int *keysize);
+extern const struct ltc_cipher_descriptor des_desc;
+#ifdef LTC_DES3
int des3_setup(const unsigned char *key, int keylen, int num_rounds, symmetric_key *skey);
int des3_ecb_encrypt(const unsigned char *pt, unsigned char *ct, symmetric_key *skey);
int des3_ecb_decrypt(const unsigned char *ct, unsigned char *pt, symmetric_key *skey);
int des3_test(void);
void des3_done(symmetric_key *skey);
int des3_keysize(int *keysize);
-extern const struct ltc_cipher_descriptor des_desc, des3_desc;
+extern const struct ltc_cipher_descriptor des3_desc;
+#endif
#endif
#ifdef LTC_CAST5