Teen Programmers Unite  
 

 

Return to forum top

C++

Posted by mattlynam2002 [send private reply] at September 18, 2002, 01:04:52 PM

hi ! Does anyone know how to make a very , very simple password protected program ? Not anything fancy just a Win32 Console App that stops the user from viewing somit in less he/she knows the password.
Please help
thanx

Posted by whizkide [send private reply] at September 18, 2002, 01:15:47 PM

ive done something like that b4. check the threads in programming for disable keyboard keys. You will just need to read in the user password and compare with the real password(s). You can use the password in 2 ways: hard coding it into the program or creating a password file. Either method works fine but 1 is easier to crack.
Also you might want to use some kind of "encrypted" input ie just capture the password as it is being typed in and display "*" to the screen for each one.
whizzzzzzzzzzzzzzzzzzzzzzzzzz

Posted by Psion [send private reply] at September 18, 2002, 03:49:16 PM

Obviously everything whizkide suggested is completely useless if the user knows how to read assembly code and thus find the right password. You would need to use _real_ encryption, like RSA or whatnot, to avoid that.

Posted by mop [send private reply] at September 18, 2002, 05:09:33 PM

Hashing is the future man, go with md5.

Posted by DragonWolf [send private reply] at September 18, 2002, 06:42:03 PM

You guys do realise he said very very simple, so whizkides answer is fine ^^

Posted by mattlynam2002 [send private reply] at September 19, 2002, 01:49:09 PM

umm, very technical ! Ive only just began prgramming so dont really understand anything. But thanx anyway whizkide!

You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.