General Password questions
Riccardo Attilio Galli
riquito at riquito.matrix
Tue Sep 23 09:26:55 EDT 2003
On Mon, 22 Sep 2003 19:32:50 -0400, Peter Hansen wrote:
> Todd Johnson wrote:
>>
>> On a similar note, I want to save the password to a
>> file. How do I encrypt the password?
>
> You don't encrypt passwords, you hash them. That means use a
> cryptographically strong hashing algorithm such as SHA or MD5
> and store the resulting value. Later, when a user has entered
> a password which you want to check against the correct one, you
> run the same hash algorithm on the password-under-test and compare
> the result with the stored result.
> [...]
> -Peter
Hi Peter,
what about if I would reload an entered password?
I wrote an e-mail client, and I haven't found a way to store the password
that an user enter the first time and use it when the program is restarted.
I don't want to ask to the user every time the account password, but also
I don't want to store it as plain text.
Do you know what is the usual practice in these cases?
Thanks,
Riccardo
--
-=Riccardo Galli=-
_,e.
s~ ``
~@. ideralis Programs
. ol
`**~ http://www.sideralis.net
More information about the Python-list
mailing list