Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Keeping a password safe.

by DrHyde (Prior)
on Jun 11, 2012 at 10:52 UTC ( #975538=note: print w/ replies, xml ) Need Help??


in reply to Keeping a password safe.

Same as you would in any other language - keep the plain-text in memory for as little time as possible, overwrite the variable once you no longer need it (before free()ing or, in perl, letting it fall out of scope), try to prevent it from being written to swap (kinda tricky in perl - look for wrappers around mlock(2)).

A password in a variable in a C program is also visible - to a user using the debugger, or a user who can make your program dump core, or a user who can look at whatever your platform's equivalent of /proc/$PID/mem is.


Comment on Re: Keeping a password safe.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://975538]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2014-09-16 06:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (157 votes), past polls