Click here to Skip to main content
15,916,288 members
Home / Discussions / C#
   

C#

 
AnswerRe: Which of the following methods and attributes are NOT part of the VB.NET Exception class API? Pin
Keith Barrow27-Jan-14 12:57
professionalKeith Barrow27-Jan-14 12:57 
AnswerRe: Which of the following methods and attributes are NOT part of the VB.NET Exception class API? Pin
Dave Kreskowiak27-Jan-14 16:11
mveDave Kreskowiak27-Jan-14 16:11 
AnswerRe: Which of the following methods and attributes are NOT part of the VB.NET Exception class API? Pin
SOHAM_GANDHI1-Feb-14 2:42
SOHAM_GANDHI1-Feb-14 2:42 
QuestionPrinting Docu and image.? Pin
ijtan1027-Jan-14 8:27
ijtan1027-Jan-14 8:27 
AnswerRe: Printing Docu and image.? Pin
Richard Andrew x6427-Jan-14 8:43
professionalRichard Andrew x6427-Jan-14 8:43 
AnswerRe: Printing Docu and image.? Pin
Pete O'Hanlon27-Jan-14 10:14
mvePete O'Hanlon27-Jan-14 10:14 
QuestionRe: Printing Docu and image.? Pin
thatraja27-Jan-14 14:12
professionalthatraja27-Jan-14 14:12 
QuestionNeed Help Please time is running out.! Pin
Isiah Johnson Tan27-Jan-14 8:18
Isiah Johnson Tan27-Jan-14 8:18 
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 

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.