Disable browser ‘Save Password’ functionality

One of the joys of working for a government healthcare agency is having to deal with all of the paranoia around dealing with PHI (Protected Health Information). Don’t get me wrong, I’m all for doing everything possible to protect people’s personal information (health, financial, surfing habits, etc.), but sometimes people get a little too jumpy. … Read more

Best way to store password in database [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for … Read more

How to generate a random string in Ruby

I’m currently generating an 8-character pseudo-random uppercase string for “A” .. “Z”: value = “”; 8.times{value << (65 + rand(25)).chr} but it doesn’t look clean, and it can’t be passed as an argument since it isn’t a single statement. To get a mixed-case string “a” .. “z” plus “A” .. “Z”, I changed it to: … Read more

Secure hash and salt for PHP passwords

It is currently said that MD5 is partially unsafe. Taking this into consideration, I’d like to know which mechanism to use for password protection. This question, Is “double hashing” a password less secure than just hashing it once? suggests that hashing multiple times may be a good idea, whereas How to implement password protection for … Read more

How do you use bcrypt for hashing passwords in PHP?

Every now and then I hear the advice “Use bcrypt for storing passwords in PHP, bcrypt rules”. But what is bcrypt? PHP doesn’t offer any such functions, Wikipedia babbles about a file-encryption utility and Web searches just reveal a few implementations of Blowfish in different languages. Now Blowfish is also available in PHP via mcrypt, … Read more

Why is char[] preferred over String for passwords?

In Swing, the password field has a getPassword() (returns char[]) method instead of the usual getText() (returns String) method. Similarly, I have come across a suggestion not to use String to handle passwords. Why does String pose a threat to security when it comes to passwords? It feels inconvenient to use char[]. 1 18 Strings … Read more