Jump to content




How To Make Settings?


  • You cannot reply to this topic
4 replies to this topic

#1 mrdawgza

  • Members
  • 110 posts
  • LocationSouth Africa

Posted 25 September 2013 - 07:21 AM

I have an operating system, still in development.
Now I have a menu called options,
Now I have a account system, with at default 3 accounts.
They all have default names, so how can I get a option in the options menu thatcan change the username or password of the account?
If this can be done, then you don't have to go all the way into the files and stuff.

#2 amtra5

  • Members
  • 166 posts
  • LocationMelbourne, Australia

Posted 25 September 2013 - 07:41 AM

Step 1: Input old username
Step 2: Input old password
Step 3: Hash & salt old password
Step 4: Compared hashed and salted password with hashed and salted password in a file
Step 5: If they are the same, ask for new username
Step 6: Ask for new password
Step 7: Hash & salt new password
Step 8: Change the old username & hashed & salted old password with new one in the file

Although this doesn't stop any other program from editing/reading the user/hashed & salted password file

#3 mrdawgza

  • Members
  • 110 posts
  • LocationSouth Africa

Posted 25 September 2013 - 07:53 AM

Could you show me an example code?

#4 MR_nesquick

  • Members
  • 106 posts
  • LocationNorway

Posted 25 September 2013 - 02:44 PM

i don't know how you are saving the usernames and passwords, but i got an example if you're using tables. (reading "table issue".. so close :P)

Example:
Spoiler


#5 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 25 September 2013 - 02:50 PM

View PostMR_nesquick, on 25 September 2013 - 02:44 PM, said:

i don't know how you are saving the usernames and passwords, but i got an example if you're using tables.

Example:
Spoiler
If you're going to do it that way, you may as well use lookup tables!

Very Basic Example
Spoiler






2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users