securely getting the user's password

Paul Rubin http
Sun Mar 9 00:35:51 EST 2008


Chick <anh.hai.trinh at gmail.com> writes:
> I'm writing a security tool which requies wiping off the memory of
> certain string after being used, which I've done by implementing it as
> a mutable list as follow:

You really can't do that reliably in Python and for that matter you
can't really do it reliably in any other language, without OS and
possibly hardware assistance to make sure the password isn't paged or
swapped, etc.  In Linux, for example, see the mlock system call.



More information about the Python-list mailing list