comparison common-algo.c @ 1038:d3925ed45a85

Fix for old compilers, variable declarations at beginning of functions and /**/ comments
author Thorsten Horstmann <thorsten.horstmann@web.de>
date Tue, 24 Feb 2015 20:51:18 +0800
parents 6c42bab6e081
children 1e486f368ec3 c45d65392c1a
comparison
equal deleted inserted replaced
1037:7c899f24a85b 1038:d3925ed45a85
85 /* A few void* s are required to silence warnings 85 /* A few void* s are required to silence warnings
86 * about the symmetric_CBC vs symmetric_CTR cipher_state pointer */ 86 * about the symmetric_CBC vs symmetric_CTR cipher_state pointer */
87 #ifdef DROPBEAR_ENABLE_CBC_MODE 87 #ifdef DROPBEAR_ENABLE_CBC_MODE
88 const struct dropbear_cipher_mode dropbear_mode_cbc = 88 const struct dropbear_cipher_mode dropbear_mode_cbc =
89 {(void*)cbc_start, (void*)cbc_encrypt, (void*)cbc_decrypt}; 89 {(void*)cbc_start, (void*)cbc_encrypt, (void*)cbc_decrypt};
90 #endif // DROPBEAR_ENABLE_CBC_MODE 90 #endif /* DROPBEAR_ENABLE_CBC_MODE */
91 91
92 const struct dropbear_cipher_mode dropbear_mode_none = 92 const struct dropbear_cipher_mode dropbear_mode_none =
93 {void_start, void_cipher, void_cipher}; 93 {void_start, void_cipher, void_cipher};
94 94
95 #ifdef DROPBEAR_ENABLE_CTR_MODE 95 #ifdef DROPBEAR_ENABLE_CTR_MODE
100 int num_rounds, symmetric_CTR *ctr) { 100 int num_rounds, symmetric_CTR *ctr) {
101 return ctr_start(cipher, IV, key, keylen, num_rounds, CTR_COUNTER_BIG_ENDIAN, ctr); 101 return ctr_start(cipher, IV, key, keylen, num_rounds, CTR_COUNTER_BIG_ENDIAN, ctr);
102 } 102 }
103 const struct dropbear_cipher_mode dropbear_mode_ctr = 103 const struct dropbear_cipher_mode dropbear_mode_ctr =
104 {(void*)dropbear_big_endian_ctr_start, (void*)ctr_encrypt, (void*)ctr_decrypt}; 104 {(void*)dropbear_big_endian_ctr_start, (void*)ctr_encrypt, (void*)ctr_decrypt};
105 #endif // DROPBEAR_ENABLE_CTR_MODE 105 #endif /* DROPBEAR_ENABLE_CTR_MODE */
106 106
107 /* Mapping of ssh hashes to libtomcrypt hashes, including keysize etc. 107 /* Mapping of ssh hashes to libtomcrypt hashes, including keysize etc.
108 {&hash_desc, keysize, hashsize} */ 108 {&hash_desc, keysize, hashsize} */
109 109
110 #ifdef DROPBEAR_SHA1_HMAC 110 #ifdef DROPBEAR_SHA1_HMAC