Click here to Skip to main content
15,903,362 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: based pointer crashed my app Pin
Michael Dunn24-Jan-07 9:34
sitebuilderMichael Dunn24-Jan-07 9:34 
GeneralRe: based pointer crashed my app Pin
Alex Cutovoi24-Jan-07 11:40
Alex Cutovoi24-Jan-07 11:40 
GeneralRe: based pointer crashed my app Pin
Michael Dunn24-Jan-07 12:37
sitebuilderMichael Dunn24-Jan-07 12:37 
GeneralRe: based pointer crashed my app Pin
Alex Cutovoi25-Jan-07 16:34
Alex Cutovoi25-Jan-07 16:34 
QuestionComputing hashes and comparing hashes for C++ Pin
vgandhi24-Jan-07 2:05
vgandhi24-Jan-07 2:05 
AnswerRe: Computing hashes and comparing hashes for C++ Pin
James R. Twine24-Jan-07 7:28
James R. Twine24-Jan-07 7:28 
GeneralRe: Computing hashes and comparing hashes for C++ Pin
vgandhi24-Jan-07 8:09
vgandhi24-Jan-07 8:09 
GeneralRe: Computing hashes and comparing hashes for C++ Pin
James R. Twine24-Jan-07 11:14
James R. Twine24-Jan-07 11:14 
   As alreasy posted, CryptHashData(...) and its related functions can generate a hash value from your raw data (username/password).

   You will not be able to just use == to compare the hash values unless you have the hash values encapsulated in an object that overrides that operator.  You can always use memcmp(...) to compare the raw data.

   One thing - some systems store password hashes in a database instead of the plaintext password, and then just have to compare the hash values to verify it - that way, you do not risk the plaintext password if someone gets into the database.

   However, do not try to do the same thing usernames - depending on the hashing technique, there exists a chance (however slim it may be) for two different usernames produce the same hash value.  If this happens, you will be unable to disambiguate one from the other in the database and will not know which one is logging in, or which password hash to compare against.

   Peace!


-=- James
Please rate this message - let me know if I helped or not!<HR>If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles

GeneralRe: Computing hashes and comparing hashes for C++ Pin
vgandhi24-Jan-07 20:35
vgandhi24-Jan-07 20:35 
AnswerRe: Computing hashes and comparing hashes for C++ Pin
Michael Dunn24-Jan-07 9:36
sitebuilderMichael Dunn24-Jan-07 9:36 
GeneralRe: Computing hashes and comparing hashes for C++ Pin
vgandhi24-Jan-07 20:29
vgandhi24-Jan-07 20:29 
GeneralRe: Computing hashes and comparing hashes for C++ Pin
Michael Dunn24-Jan-07 20:41
sitebuilderMichael Dunn24-Jan-07 20:41 
GeneralRe: Computing hashes and comparing hashes for C++ Pin
vgandhi25-Jan-07 0:30
vgandhi25-Jan-07 0:30 
AnswerRe: Computing hashes and comparing hashes for C++ Pin
El Corazon24-Jan-07 15:06
El Corazon24-Jan-07 15:06 
QuestionOnNcActivate not called in a child window Pin
Sandy Kinghorn24-Jan-07 1:23
Sandy Kinghorn24-Jan-07 1:23 
AnswerRe: OnNcActivate not called in a child window Pin
Mark Salsbery24-Jan-07 5:58
Mark Salsbery24-Jan-07 5:58 
GeneralRe: OnNcActivate not called in a child window Pin
Sandy Kinghorn24-Jan-07 6:33
Sandy Kinghorn24-Jan-07 6:33 
QuestionRe: OnNcActivate not called in a child window Pin
Mark Salsbery24-Jan-07 6:42
Mark Salsbery24-Jan-07 6:42 
AnswerRe: OnNcActivate not called in a child window Pin
Sandy Kinghorn1-Feb-07 7:36
Sandy Kinghorn1-Feb-07 7:36 
GeneralRe: OnNcActivate not called in a child window Pin
Mark Salsbery1-Feb-07 11:30
Mark Salsbery1-Feb-07 11:30 
QuestionOnKeyDown Call Dialog Pin
JennK24-Jan-07 1:22
JennK24-Jan-07 1:22 
AnswerRe: OnKeyDown Call Dialog Pin
jhwurmbach24-Jan-07 1:34
jhwurmbach24-Jan-07 1:34 
GeneralRe: OnKeyDown Call Dialog Pin
JennK24-Jan-07 3:50
JennK24-Jan-07 3:50 
QuestionHow to get refernce count on file handle Pin
pavan_sw24-Jan-07 1:00
pavan_sw24-Jan-07 1:00 
AnswerRe: How to get refernce count on file handle Pin
KarstenK24-Jan-07 2:28
mveKarstenK24-Jan-07 2:28 

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.