Click here to Skip to main content
15,901,873 members
Home / Discussions / C#
   

C#

 
AnswerRe: Need Help Please time is running out.! Pin
Ravi Bhavnani27-Jan-14 8:20
professionalRavi Bhavnani27-Jan-14 8:20 
AnswerRe: Need Help Please time is running out.! Pin
gettgotcha27-Jan-14 8:51
gettgotcha27-Jan-14 8:51 
AnswerRe: Need Help Please time is running out.! Pin
Rahul VB28-Jan-14 7:45
professionalRahul VB28-Jan-14 7:45 
Questionconnect to mikrotik server Pin
ashraf hakiem27-Jan-14 7:23
ashraf hakiem27-Jan-14 7:23 
AnswerRe: connect to mikrotik server Pin
OriginalGriff27-Jan-14 8:07
mveOriginalGriff27-Jan-14 8:07 
GeneralRe: connect to mikrotik server Pin
Rahul VB28-Jan-14 7:46
professionalRahul VB28-Jan-14 7:46 
AnswerRe: connect to mikrotik server Pin
Eddy Vluggen27-Jan-14 9:19
professionalEddy Vluggen27-Jan-14 9:19 
QuestionImage processing Pin
IJAJ MULANI26-Jan-14 20:01
IJAJ MULANI26-Jan-14 20:01 
QuestionRe: Image processing Pin
Richard MacCutchan26-Jan-14 21:50
mveRichard MacCutchan26-Jan-14 21:50 
AnswerRe: Image processing Pin
Chris Quinn26-Jan-14 22:24
Chris Quinn26-Jan-14 22:24 
AnswerRe: Image processing Pin
BillWoodruff27-Jan-14 0:55
professionalBillWoodruff27-Jan-14 0:55 
GeneralRe: Image processing Pin
OriginalGriff27-Jan-14 2:32
mveOriginalGriff27-Jan-14 2:32 
GeneralRe: Image processing Pin
Shameel27-Jan-14 2:47
professionalShameel27-Jan-14 2:47 
AnswerRe: Image processing Pin
Rahul VB28-Jan-14 7:47
professionalRahul VB28-Jan-14 7:47 
QuestionDerek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one26-Jan-14 19:03
ahmed_one26-Jan-14 19:03 
AnswerRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
Garth J Lancaster26-Jan-14 19:48
professionalGarth J Lancaster26-Jan-14 19:48 
I had a very quick look at what was going on - essentially, this

C#
if (!BCrypt.CheckPassword(txtPass.Text.Trim().ToString(), hashpassdb))


is wrong - which I think stems from this

C#
txtHash.Text = BCrypt.HashPassword(txtPass.Text.Trim().ToString(),BCrypt.GenerateSalt(12));


The crux is you're generating a NEW salt when you use BCrypt.GenerateSalt(12) - you should use the original hashpassdb instead (I don't know how you are going to do that)

The reason is, hashpassdb contains the original salt value. The clue is in BCrypt's code, function CheckPassword

C#
public static bool CheckPassword(string plaintext, string hashed) {
    return StringComparer.Ordinal.Compare(hashed, HashPassword(plaintext, hashed)) == 0;
}


'g'
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one26-Jan-14 20:10
ahmed_one26-Jan-14 20:10 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
Garth J Lancaster26-Jan-14 20:29
professionalGarth J Lancaster26-Jan-14 20:29 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one26-Jan-14 20:42
ahmed_one26-Jan-14 20:42 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
Garth J Lancaster26-Jan-14 20:49
professionalGarth J Lancaster26-Jan-14 20:49 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one26-Jan-14 20:59
ahmed_one26-Jan-14 20:59 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
Garth J Lancaster26-Jan-14 21:06
professionalGarth J Lancaster26-Jan-14 21:06 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one26-Jan-14 21:16
ahmed_one26-Jan-14 21:16 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
Garth J Lancaster26-Jan-14 23:30
professionalGarth J Lancaster26-Jan-14 23:30 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one26-Jan-14 23:35
ahmed_one26-Jan-14 23:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.