Fix array size with old libsodium

This commit is contained in:
Max Lv
2017-01-25 10:30:52 +08:00
parent 30fe158d88
commit 7ad1e65f6e
+8 -2
View File
@@ -226,11 +226,17 @@ static const CCMode supported_modes_applecc[CIPHER_NUM] = {
#endif
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] = {
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