summaryrefslogtreecommitdiff
path: root/src/option.c
diff options
context:
space:
mode:
authorChristian Brabandt <cb@256bit.org>2021-06-20 14:02:16 +0200
committerBram Moolenaar <Bram@vim.org>2021-06-20 14:02:16 +0200
commitf573c6e1ed58d46d694c802eaf5ae3662a952744 (patch)
tree9d3ccf4402f322b9d1baf130696a6b0e600ae693 /src/option.c
parent208f0b48b2c616b29f377a1408290111ed2663f7 (diff)
downloadvim-git-f573c6e1ed58d46d694c802eaf5ae3662a952744.tar.gz
patch 8.2.3022: available encryption methods are not strong enoughv8.2.3022
Problem: Available encryption methods are not strong enough. Solution: Add initial support for xchaha20. (Christian Brabandt, closes #8394)
Diffstat (limited to 'src/option.c')
-rw-r--r--src/option.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c
index 535213c19..07bb71e4d 100644
--- a/src/option.c
+++ b/src/option.c
@@ -2713,6 +2713,10 @@ set_bool_option(
|| (opt_flags & OPT_GLOBAL) || opt_flags == 0)
&& !curbufIsChanged() && curbuf->b_ml.ml_mfp != NULL)
{
+#ifdef FEAT_CRYPT
+ if (crypt_get_method_nr(curbuf) == CRYPT_M_SOD)
+ continue;
+#endif
u_compute_hash(hash);
u_read_undo(NULL, hash, curbuf->b_fname);
}