Browse Source

Fix array size with old libsodium

pull/1136/head
Max Lv 8 years ago
parent
commit
7ad1e65f6e
1 changed files with 8 additions and 2 deletions
  1. 10
      src/encrypt.c

10
src/encrypt.c

@ -226,11 +226,17 @@ static const CCMode supported_modes_applecc[CIPHER_NUM] = {
#endif #endif
static const int supported_ciphers_iv_size[CIPHER_NUM] = { static const int supported_ciphers_iv_size[CIPHER_NUM] = {
0, 0, 16, 16, 16, 16, 16, 16, 16, 8, 16, 16, 16, 8, 8, 8, 8, 16, 8, 8, 12
0, 0, 16, 16, 16, 16, 16, 16, 16, 8, 16, 16, 16, 8, 8, 8, 8, 16, 8, 8
#if SODIUM_LIBRARY_VERSION_MAJOR >= 8
, 12
#endif
}; };
static const int supported_ciphers_key_size[CIPHER_NUM] = { static const int supported_ciphers_key_size[CIPHER_NUM] = {
0, 16, 16, 16, 24, 32, 16, 24, 32, 16, 16, 24, 32, 16, 8, 16, 16, 16, 32, 32, 32
0, 16, 16, 16, 24, 32, 16, 24, 32, 16, 16, 24, 32, 16, 8, 16, 16, 16, 32, 32
#if SODIUM_LIBRARY_VERSION_MAJOR >= 8
, 32
#endif
}; };
static int static int

Loading…
Cancel
Save