Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
is Bcrypt one way-hash ?
i try to store admin password to database using Bcrypt encryption.
how about admin forget password ?
how to know admin plain password from password encryption?

What I have tried:

tb2.Text = BCrypt.Net.BCrypt.HashPassword(tb1.Text)
Posted
Updated 13-Sep-17 22:45pm

1 solution

Quote:
is Bcrypt one way-hash ?
Yes. All hashes are effectively one-way: they throw away information to produce a "unique" value for the input.

Quote:
how about admin forget password ?
When you forget a password, you reset it to a new value (and store the hash of that in the DB) and send the new password to the user, encouraging them to change it to one they can remember. (In order to make them do this, I use GUIDs as the new password - nobody wants to try and remember them, so they do reset the value pretty quickly)

Quote:
how to know admin plain password from password encryption?
You can't: all passwords are stored as hashes, so that nobody at all (except the user) has any idea what password they used.
 
Share this answer
 
Comments
Khabibb Mubarakk 14-Sep-17 6:21am    
Send the new passwordto the user(admin) ?
How to do it? I'm make dekstop and offline app... Send directly on app when user ask forget password?? It look like not secure...
Afzaal Ahmad Zeeshan 14-Sep-17 6:24am    
You can display that in a message box if this is a desktop application and works offline.

As for the secure part, I agree, but you should consider a secure channel to send the password and do not send in plain-text format.
OriginalGriff 14-Sep-17 6:53am    
The usual way is to email it to the user at his registered email address - and expire it if not confirmed in a reasonable period - so that someone with access to the app can't "steal" the account without having access to the email account as well.
Khabibb Mubarakk 14-Sep-17 6:57am    
Exactly need connection(online).
No any method is secure when offline
OriginalGriff 14-Sep-17 7:15am    
No method is secure when offline: an attacker has physical access to the machine, so can access anything your user can that isn't separately password protected. In most cases, the only thing that is almost guaranteed to exist and be password protected is an email account.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900