This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
gtapokomon's profile picture

Help! Changeable Password.

Started by gtapokomon, 09 December 2012 - 09:34 PM
gtapokomon #1
Posted 09 December 2012 - 10:34 PM
Hey everyone,

So what I am trying to do is make a program that when you turn on a pc you log in with a password. This is pretty easy. But the thing is, on a server i work with multiple others and we have developed an OS to sell to people on the server. We want to add this password function in, but the tricky bit is that we want an option for the user to be able to change their login password without actually having to change the code. This change also needs to stay in effect when the computer restarts/reboots. Anyone have any Idea on how we would go about doing this?

Please let me know,
Gta
Tiin57 #2
Posted 09 December 2012 - 11:34 PM
Save each password as a file. Perhaps hash it for security using Tomass1996's StringUtils API.
Sammich Lord #3
Posted 09 December 2012 - 11:58 PM
Just hash it(For security) then save it to a file and load the file on every bootup.
gtapokomon #4
Posted 10 December 2012 - 06:51 PM
how exactly do you save and load it? im kind of a noob at this.
Cruor #5
Posted 10 December 2012 - 06:55 PM
Moved to Ask a Pro, should be easier to get a answer in there.
bjornir90 #6
Posted 10 December 2012 - 07:02 PM
how exactly do you save and load it? im kind of a noob at this.
Look on the wiki at the fs API there are all the basics you need :)/>. And if you want more explanation, ask for it !