0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

patch 9.0.1481: decrypting with libsodium may fail if the library changes

Problem:    Decrypting with libsodium may fail if the library changes.
Solution:   Add parameters used to the encrypted file header. (Christian
            Brabandt, closes #12279)
This commit is contained in:
Christian Brabandt
2023-04-23 17:50:22 +01:00
committed by Bram Moolenaar
parent dcd40cfca0
commit aae583441b
16 changed files with 422 additions and 121 deletions

View File

@@ -2771,11 +2771,24 @@ typedef struct {
# define CRYPT_M_BF 1
# define CRYPT_M_BF2 2
# define CRYPT_M_SOD 3
# define CRYPT_M_COUNT 4 // number of crypt methods
# define CRYPT_M_SOD2 4
# define CRYPT_M_COUNT 5 // number of crypt methods
// Currently all crypt methods work inplace. If one is added that isn't then
// define this.
# define CRYPT_NOT_INPLACE 1
// Struct for passing arguments down to the crypt_init functions
typedef struct {
char_u *cat_salt;
int cat_salt_len;
char_u *cat_seed;
int cat_seed_len;
char_u *cat_add;
int cat_add_len;
int cat_init_from_file;
} crypt_arg_T;
#endif
#ifdef FEAT_PROP_POPUP