How would this be achieved?

Started by
1 comment, last by TFS_Waldo 18 years, 8 months ago
Hi folks, I've moved away from game development, and I'm working on a chat system using C++ (I wrote something in VB for a school project earlier this year, but I'm reinventing the wheel before I go to University in September). What I'm doing is having a logon system - you can't log into the system without a username and password. There are a number of ways of going about it, but I'm unsure which one to use. Would sending a packet with the username and password combined be the best way? Problem is, how would the receiving server app be able to differentiate between username and password before authenticating? And how will the usernames and passwords be stored, in some kind of encrypted database? I'd have to code the appropriate solution to this problem. I've decided to have the logon form using a listening socket to detect the server sending back an "acknowledgement" packet, triggering the client to close the logon dialogue and opening the main window. This is a fairly substantial project I've got going here. If it's good enough and big enough I will release it, most probably closed-source. At a later stage in development, I'll post details in Your Announcements - if anything this project would make a cracking portfolio piece if I can pull it off properly. If any of you can poke any more advice in my direction, I'd be most appreciative. Thanks, ukdeveloper.
Advertisement
Generally, the passwords are stored as a one way hash. As for username/password pairs, just having a delimiter between them [like \n?] should be sufficient for your app to pick them apart to test with.
As far as sending username and password goes, I would consider encrypting them, and send them with some sort of character as a "splitter." For example, username and password (sending unencrypted) is "user" and "pass." You could send it by doing "user$pass," and the server would read each side of the '$' splitter character. But, you should come up with your own basic encryption algorithm. That's all I can say on that subject. =)
:==-_ Why don't the voices just leave me alone?! _-==:

This topic is closed to new replies.

Advertisement