thomas wrote: >>However, I suspect that there's no way to get vim to feed the >>p-r-b-password to the builtin encryption/decryption facilities. >> >> > >I thought the :X command does little more than setting the key option? >At least from running some (i.e. two) tests, I'd say that you could >also encrypt a file by setting the key option to a password (setlocal >key=foo) before saving. > >IIRC the encryption is rather weak though (with vim 7.1). > > Not much I can do about the encryption method, but perhaps its better than plaintext. And, the expected use of the process ID is amenable to searching, anyway. I'm now feeling that the procedure is more likely to work:
* ask user for password * place password in its own buffer * specify encryption for the buffer with set key=... using process pid * save the buffer When the user wants to read/write using that password transparently in the future * check if buffer exists * use the process id and set key on a new buffer, read password-containing buffer * use decrypted password to do file transfer I'm not at sure that this complicated process is worth the trouble, though: * the search is limited to potential process IDs, so that's a rather limited search space * a buffer or two is created with the password in the clear, and a file is saved with that (encrypted) password. Regards, Chip Campbell --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---