summaryrefslogtreecommitdiffstats
path: root/src/crypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypt.c')
-rw-r--r--src/crypt.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/crypt.c b/src/crypt.c
index c54e15c4af..f25a2c4a9d 100644
--- a/src/crypt.c
+++ b/src/crypt.c
@@ -504,6 +504,26 @@ crypt_free_key(key)
}
/*
+ * Check the crypt method and give a warning if it's outdated.
+ */
+ void
+crypt_check_method(method)
+ int method;
+{
+ if (method < CRYPT_M_BF2)
+ {
+ msg_scroll = TRUE;
+ MSG(_("Warning: Using a weak encryption method; see :help 'cm'"));
+ }
+}
+
+ void
+crypt_check_current_method()
+{
+ crypt_check_method(crypt_get_method_nr(curbuf));
+}
+
+/*
* Ask the user for a crypt key.
* When "store" is TRUE, the new key is stored in the 'key' option, and the
* 'key' option value is returned: Don't free it.