diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/idea/idea.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/libcrypto/idea/idea.h b/src/lib/libcrypto/idea/idea.h index ae32f5692e..f14adf8398 100644 --- a/src/lib/libcrypto/idea/idea.h +++ b/src/lib/libcrypto/idea/idea.h | |||
| @@ -59,10 +59,6 @@ | |||
| 59 | #ifndef HEADER_IDEA_H | 59 | #ifndef HEADER_IDEA_H |
| 60 | #define HEADER_IDEA_H | 60 | #define HEADER_IDEA_H |
| 61 | 61 | ||
| 62 | #ifdef __cplusplus | ||
| 63 | extern "C" { | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifdef NO_IDEA | 62 | #ifdef NO_IDEA |
| 67 | #error IDEA is disabled. | 63 | #error IDEA is disabled. |
| 68 | #endif | 64 | #endif |
| @@ -74,22 +70,26 @@ extern "C" { | |||
| 74 | #define IDEA_BLOCK 8 | 70 | #define IDEA_BLOCK 8 |
| 75 | #define IDEA_KEY_LENGTH 16 | 71 | #define IDEA_KEY_LENGTH 16 |
| 76 | 72 | ||
| 73 | #ifdef __cplusplus | ||
| 74 | extern "C" { | ||
| 75 | #endif | ||
| 76 | |||
| 77 | typedef struct idea_key_st | 77 | typedef struct idea_key_st |
| 78 | { | 78 | { |
| 79 | IDEA_INT data[9][6]; | 79 | IDEA_INT data[9][6]; |
| 80 | } IDEA_KEY_SCHEDULE; | 80 | } IDEA_KEY_SCHEDULE; |
| 81 | 81 | ||
| 82 | const char *idea_options(void); | 82 | const char *idea_options(void); |
| 83 | void idea_ecb_encrypt(unsigned char *in, unsigned char *out, | 83 | void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, |
| 84 | IDEA_KEY_SCHEDULE *ks); | 84 | IDEA_KEY_SCHEDULE *ks); |
| 85 | void idea_set_encrypt_key(unsigned char *key, IDEA_KEY_SCHEDULE *ks); | 85 | void idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); |
| 86 | void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); | 86 | void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); |
| 87 | void idea_cbc_encrypt(unsigned char *in, unsigned char *out, | 87 | void idea_cbc_encrypt(const unsigned char *in, unsigned char *out, |
| 88 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); | 88 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv,int enc); |
| 89 | void idea_cfb64_encrypt(unsigned char *in, unsigned char *out, | 89 | void idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, |
| 90 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, | 90 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, |
| 91 | int *num,int enc); | 91 | int *num,int enc); |
| 92 | void idea_ofb64_encrypt(unsigned char *in, unsigned char *out, | 92 | void idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, |
| 93 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); | 93 | long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, int *num); |
| 94 | void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); | 94 | void idea_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); |
| 95 | #ifdef __cplusplus | 95 | #ifdef __cplusplus |
