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

Cc-Computer-Side Hashing

Started by sctjkc01, 06 October 2013 - 11:07 PM
sctjkc01 #1
Posted 07 October 2013 - 01:07 AM
So, I'm trying to make a Lua/PHP amalgamation that allows for off-server computer manipulation. Specifically, allowing users to change variables via web browser that affects computers in-game.

…mainly so I could manage an IC2 Breeder Reactor without logging in (just whether it's working or not).

Anyway, I'm just wondering if there's anything ComputerCraft-Computer-Side that allows for hashing, so that per-user passwords can be hashed before they're shipped off-server. If not, I'm also game for something that'd be shunted into the rom/apis folder.

As for algorithm, I don't particularly care, so long as they can hash relatively instantaneously. If it takes more than an MC tick, I don't think I'd want it.

Any idea where I could find such a function and/or API?

(As a small side note, I also manage the server this is for - I have the ability to work from an FTP POV.)
theoriginalbit #2
Posted 07 October 2013 - 01:20 AM
You should use the forum's search feature more often. It is very useful. GravityScore's SHA256 Hashing Algorithm.

Then in PHP side when validating you just do hash("sha256", $input_password); where $input_password is the password they entered into the web form.
sctjkc01 #3
Posted 07 October 2013 - 01:26 AM
You should use the forum's search feature more often. It is very useful. GravityScore's SHA256 Hashing Algorithm.

Then in PHP side when validating you just do hash("sha256", $input_password); where $input_password is the password they entered into the web form.

…well. I suppose I just wasn't searching for the right things.; Searched "password hashing" and just gave up after that. Thanks much.

(Topic close requested.)