diff runtime/doc/recover.txt @ 2267:c08f91142c41 vim73

Crypt the swapfile.
author Bram Moolenaar <bram@vim.org>
date Mon, 21 Jun 2010 06:15:46 +0200
parents 7c8c7c95a865
children 12b829477c60
line wrap: on
line diff
--- a/runtime/doc/recover.txt
+++ b/runtime/doc/recover.txt
@@ -188,4 +188,43 @@ will continue to get warning messages th
 
 {Vi: recovers in another way and sends mail if there is something to recover}
 
+
+ENCRYPTION AND THE SWAP FILE				*:recover-crypt*
+
+When the text file is encrypted the swap file is encrypted as well.  This
+makes recovery a bit more complicated.  When recovering from a swap file and
+encryption has been used, you will be asked to enter one or two crypt keys.
+
+If the text file does not exist you will only be asked to enter the crypt key
+for the swap file.
+
+If the text file does exist, it may be encrypted in a different way than the
+swap file.  You will be asked for the crypt key twice:
+
+	Need encryption key for "/tmp/tt" ~
+	Enter encryption key: ****** ~
+	"/tmp/tt" [crypted] 23200L, 522129C ~
+	Using swap file "/tmp/.tt.swp" ~
+	Original file "/tmp/tt" ~
+	Swap file is encrypted: "/tmp/.tt.swp" ~
+	If you entered a new crypt key but did not write the text file, ~
+	enter the new crypt key. ~
+	If you wrote the text file after changing the crypt key press enter ~
+	to use the same key for text file and swap file ~
+	Enter encryption key:  ~
+
+You can be in one of these two situations:
+
+1. The encryption key was not changed, or after changing the key the text file
+   was written.  You will be prompted for the crypt key twice.  The second
+   time you can simply press Enter.  That means the same key is used for the
+   text file and the swap file.
+2. You entered a new encryption key, but did not save the text file.  Vim will
+   then use the new key for the swap file, and the text file will still be
+   encrypted with the old key.  At the second prompt enter the new key.
+
+Note that after recovery the key of the swap file will be used for the text
+file.  Thus if you write the text file, you need to use that new key.
+
+
  vim:tw=78:ts=8:ft=help:norl: