Jump to content

  • Log In with Google      Sign In   
  • Create Account

tanger32au

Member Since 20 Feb 2014
Offline Last Active Mar 03 2014 09:00 PM

Topics I've Started

Converting password to number

27 February 2014 - 03:46 AM

Hi all,
As part of the login process for my game I am storing the username / password in a file. To protect this and stop people using the password I have written some code to take the password, convert this to ASCII code, preform two mathematical operations and save this to a file.
 
Having undertaken some testing of my code I have found a couple of things:
1) Entering "Paul" produces the same result as "luaP"
2) Entering "Lisa" produces the same result as "Bart".
Paul = 180730
luaP = 180730
Lisa = 178093
Bart = 178093
 
Here is the code I have written. This is taken from my game but changed slightly to work as a standalone program.
 
[CreatePassword]
PasswordCreate$ = ""
length = 0
PasswordCreateText = 0
PasswordCreatePro$ = ""
cls
Input "Enter a password: "; PasswordCreate$
    length = len(PasswordCreate$)
    for A = 1 to length
        PasswordCreatePro$ =  mid$(PasswordCreate$, A)
        PasswordCreateText = PasswordCreateText + asc(PasswordCreatePro$)
 
    next A
 
PasswordCreateText = PasswordCreateText  * 293
PasswordCreateText = PasswordCreateText + 62944
 
Print ""; PasswordCreateText
 
open "PassWordChecker_Temp.spf" for append as #UC
print #UC, ""; PasswordCreate$;  " = "; PasswordCreateText
close #UC
 
input "? "; RunChoice$
if RunChoice$ = "q" then gosub [EndOfTest]
gosub [CreatePassword]
 
[EndOfTest]
notice "Program closed"
end
 
Paul

Login Process

20 February 2014 - 07:05 PM

I am developing a text based game at the moment which I started two years ago, I am just getting back in to it now.
 
My plan is to have a system where people can try and compete for a high score via an online system, of course to do this the scoring system needs to be secure and not able to be tampered with. I have coded up this part of the game to the point where I am happy with the security of it. Now I am thinking of adding a login type system where the first time the game is run the user creates a username / pass code which is then used in the future to login.
 
My thoughts on doing this are:
- Username + pass code
- Certificate file + pass code (the certificate file could be portable for use on other computers)
- Just a pass code
- Secret question + pass code
 
If you have done something like this yourself in the past what level of security did you decide to implement?
 
Paul

PARTNERS