Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

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?

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2016-05-28 12:41 GMT
Find Nodes?
    Voting Booth?