Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://975538]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2018-06-19 01:38 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.