Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
Garth J Lancaster26-Jan-14 23:40
professionalGarth J Lancaster26-Jan-14 23:40 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one27-Jan-14 0:00
ahmed_one27-Jan-14 0:00 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
Garth J Lancaster26-Jan-14 23:44
professionalGarth J Lancaster26-Jan-14 23:44 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one27-Jan-14 0:02
ahmed_one27-Jan-14 0:02 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one28-Jan-14 3:37
ahmed_one28-Jan-14 3:37 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
Pete O'Hanlon28-Jan-14 4:00
mvePete O'Hanlon28-Jan-14 4:00 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
ahmed_one28-Jan-14 5:22
ahmed_one28-Jan-14 5:22 
GeneralRe: Derek Slager's BCrypt Class for C# Check Password Method failed Pin
Garth J Lancaster28-Jan-14 15:49
professionalGarth J Lancaster28-Jan-14 15:49 

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.