passwords

Best PHP hashing method for storing user passwords in a MySQL table?

余生颓废 提交于 2019-12-03 12:06:41
问题 I've been reading Stack Overflow questions for about 15 minutes now and every single one seems to contradict the previous one I read. Bcrypt, SHA1, MD5, and so on. I currently MD5 my passwords, but I want to make my database more secure in case of a breach. I know this has been asked a million times, but I can't seem to find a decent answer anywhere else. Thanks. 回答1: The reason you see contradictory answers is because there is no right one. You should use the most secure method that your

Generate SHA256 hash in Objective-C

╄→гoц情女王★ 提交于 2019-12-03 11:51:25
So I need to generate a Sha256 password in Objective-C, and can't figure out for the life of me how to do it! Is there something easy I'm just missing? I've tried implementing the following method (which was written for iPhone, but I figured maybe it'd work cross-platform, as some Objective-C code does) -(NSString*)sha256HashFor:(NSString*)input { const char* str = [input UTF8String]; unsigned char result[CC_SHA256_DIGEST_LENGTH]; CC_SHA256(str, strlen(str), result); NSMutableString *ret = [NSMutableString stringWithCapacity:CC_SHA256_DIGEST_LENGTH*2]; for(int i = 0; i<CC_SHA256_DIGEST_LENGTH;

Why is “Forgotten Password” bad?

萝らか妹 提交于 2019-12-03 11:40:35
I came across this statement Do not use "forgotten password" functionality. But if you must, ensure that you are only providing information to the actual user, e.g. by using an email address or challenge question that the legitimate user already provided in the past; do not allow the current user to change this identity information until the correct password has been provided. Can someone clarify why forgotten passwords are a risk? I plan to handle it by sending the user a link in their email to reset the password, but will not provide them with the old password (since it's hashed anyway), and

What's the difference between bcrypt and hashing multiple times?

自古美人都是妖i 提交于 2019-12-03 11:40:30
How is bcrypt stronger than, say, def md5lots(password, salt, rounds): if (rounds < 1) return password else newpass = md5(password + salt) return md5lots(newpass, salt, rounds-1) I get the feeling, given its hype, that more intelligent people than me have figured out that bcrypt is better than this. Could someone explain the difference in 'smart layman' terms? There are three significant differences between bcrypt and hashing multiple times with MD5: The size of the output: 128-bit (16-bytes) for MD5 and 448 bits (56-bytes) for bcrypt. If you store millions of hashes in a database, this has to

Hide/Show Password in a JTextFIeld (Java Swing)

隐身守侯 提交于 2019-12-03 11:38:10
问题 So I've been working on a Password Strength Checker and the way it works is that the user enters some random text into a textfield and then instantaneous visual feedback (breakdown of points) is displayed. I've also added a checkbox, which on being selected, should hide the password i.e. replace all the chars with asterisks, while preserving the actual text input by the user. A document listener is being used to keep track of changes inside the textfield. (each char on entry gets analyzed and

Isn't a password a form of security through obscurity?

痴心易碎 提交于 2019-12-03 11:37:35
问题 I know that security through obscurity is frowned upon and considered not really secure, but isn't a password security through obscurity? It's only secure so long as no one finds it. Is it just a matter of the level of obscurity? (i.e. a good password well salted and hashed is impractical to break) Note I'm not asking about the process of saving passwords (Assume they are properly hashed and salted). I'm asking about the whole idea using a password, which is a piece of information, which if

Password reset by emailing temporary passwords

泪湿孤枕 提交于 2019-12-03 10:19:45
问题 A group in my company is implementing a single-sign-on REST API for our applications. This authentication service has a password reset function. The application sends the username to the reset function. If that username is associated with an email address, then an email is sent to that address with a temporary password. The other approach seems to be sites which email a secure, temporary link which presents a page for the user to input a new password. This page only exists for a short period

Passwords in Emacs tramp mode editing

北慕城南 提交于 2019-12-03 10:16:45
I'm using emacs tramp mode to remotely edit files over ssh. The problem is that every time I save the file I'm editing I have to enter my user password. I find that very annoying. How can I write my password only once / editing session? Ah, from the tramp docs on password caching you can set: (setq password-cache-expiry nil) which requires the package password-cache.el . Also, in the tramp sources, it mentions reading the ssh-agent(1) man page, which shows how to set it up so that you don't have to re-enter passwords (inside, or outside of Emacs): There are two main ways to get an agent set up

Randomly generated password Rails 3.1

家住魔仙堡 提交于 2019-12-03 10:15:38
For the purpose of a new web app, I would need on my sign up page (which is administrator only) just only one email field. The thing is that I'm totally new at rails and so even basics things like that are for me really difficult... I created my authentification using Railscast #270 which uses has_secure_password method. For now, everything works great except that I dont need all this bullcrap... I also want to use Action Mailer to send the generated password to his email adress. A hex(8) password would be perfect (I have seen SecureRandom but it seems to be depreciated) Users_Controller:

Using Python to authenticate against raw username, hash, salt in DB created by ASP.NET roles/membership

℡╲_俬逩灬. 提交于 2019-12-03 10:04:12
问题 We have a current application where user login credentials are stored in a SQL Server DB. These are, basically, stored as a plain text username, a password hash, and an associated salt for this hash. These were all created by built in functions in ASP.NET's membership/role system. Here's a row for a user named 'joe' and a password of 'password': joe,kDP0Py2QwEdJYtUX9cJABg==,OJF6H4KdxFLgLu+oTDNFodCEfMA= I've dumped this stuff into a CSV file and I'm attempting to get it into a usable format