diff options
author | Christian Brabandt <cb@256bit.org> | 2023-04-23 17:50:22 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2023-04-23 17:50:22 +0100 |
commit | aae583441bcdbb0bfef3b8a1d193e04ae09ca95d (patch) | |
tree | e3cf7c27fc02e1232fe5ab8f8da32581e9782718 /src/blowfish.c | |
parent | dcd40cfca0fe0e65d405ce9711745a8ec846c30c (diff) |
patch 9.0.1481: decrypting with libsodium may fail if the library changesv9.0.1481
Problem: Decrypting with libsodium may fail if the library changes.
Solution: Add parameters used to the encrypted file header. (Christian
Brabandt, closes #12279)
Diffstat (limited to 'src/blowfish.c')
-rw-r--r-- | src/blowfish.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/blowfish.c b/src/blowfish.c index 88d4bce9e8..6a339143c7 100644 --- a/src/blowfish.c +++ b/src/blowfish.c @@ -641,11 +641,8 @@ crypt_blowfish_decode( int crypt_blowfish_init( cryptstate_T *state, - char_u* key, - char_u* salt, - int salt_len, - char_u* seed, - int seed_len) + char_u *key, + crypt_arg_T *arg) { bf_state_T *bfs = ALLOC_CLEAR_ONE(bf_state_T); @@ -660,8 +657,8 @@ crypt_blowfish_init( if (blowfish_self_test() == FAIL) return FAIL; - bf_key_init(bfs, key, salt, salt_len); - bf_cfb_init(bfs, seed, seed_len); + bf_key_init(bfs, key, arg->cat_salt, arg->cat_salt_len); + bf_cfb_init(bfs, arg->cat_seed, arg->cat_seed_len); return OK; } |