Tony Mechelynck wrote:

>Yakov Lerner wrote:
>  
>
>>On Nov 29, 2007 12:23 AM, Charles E Campbell Jr
>><[EMAIL PROTECTED]> wrote:
>>    
>>
>>>Hello!
>>>
>>>I don't see any way to encrypt/decrypt strings in the vim function
>>>library, but there is a way to encrypt a file buffer.  Netrw tries to
>>>make use of ftp, etc and its associated passwords simpler by retaining
>>>the password in a variable (which is not normally saved).  Thus one
>>>reads a file via ftp, say, provides the password to do so, and writing
>>>is done without requiring another entry of the password.  I thought
>>>about making a temporary "password" automatically using localtime() at
>>>first invocation of netrw and the process's pid.  Any good way to get
>>>the vim process's pid?  How about under Windows?
>>>      
>>>
>>On unixes that have /proc, you can get pid of vim examining
>>/proc/self.
>>    
>>
>[...]
>
>...which is a soft link to /proc/nnnn where nnnn is your PID. But the 
>difficulty is to do it without starting a different process such as bash, ls, 
>etc. (the subprocess would return its own PID, not yours). However, since Dr. 
>Chip is the author of the netrw plugin, maybe he can find a way to do it. But 
>on Windows it wouldn't work.
>  
>
The pseudo-random number is one thing; the main problem is the lack of 
functions to encrypt/decrypt an arbitrary string.  I suppose I could try 
to take the pseudo-random-based password, use :X,  and save it to a 
file, and then read that file back in to retrieve the password.  
However, I suspect that there's no way to get vim to feed the 
p-r-b-password to the builtin encryption/decryption facilities.

Regards,
Chip Campbell


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui