Change 'cryptmethod' from a number to a string option.  Make it global-local.
diff --git a/src/buffer.c b/src/buffer.c
index e7fecd7..a8808d3 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1756,6 +1756,9 @@
 #if defined(FEAT_BEVAL) && defined(FEAT_EVAL)
     clear_string_option(&buf->b_p_bexpr);
 #endif
+#if defined(FEAT_CRYPT)
+    clear_string_option(&buf->b_p_cm);
+#endif
 #if defined(FEAT_EVAL)
     clear_string_option(&buf->b_p_fex);
 #endif