Hi, I'm working on a bit of a self-tailored operating system, loosely based on MikeOS (I've kept some MikeOS calls, removed a few, added my own, stripped down the interface,..) and i seem to be stuck on a problem. I need to define userspaces and allow the system to accept passwords for multiple users that can be set up. Sounds easy, right? The only problem is i don't want a plain-text user database file sitting in the root directory for everyone to modify. Maybe someone could help me with an encryption/decryption routine?

You don't decrypt passwords, you hash them.

User types in the password, you hash it, and you compare it with the previously hashed result in the password file.

If they match, there is an exceedingly high probability that the user entered the correct password.

ah, sorry, that's what i meant. just not sure how to implement it. *facepalm*

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.