"Password hashing action", "version" => "0.5", "author" => "Starbeamrainbowlabs", "description" => "Adds a utility action (that anyone can use) called hash that hashes a given string. Useful when changing a user's password.", "id" => "action-hash", "code" => function() { /* * ██ ██ █████ ███████ ██ ██ * ██ ██ ██ ██ ██ ██ ██ * ███████ ███████ ███████ ███████ * ██ ██ ██ ██ ██ ██ ██ * ██ ██ ██ ██ ███████ ██ ██ */ add_action("hash", function() { global $settings; if(!isset($_GET["string"])) { http_response_code(422); exit(page_renderer::render_main("Missing parameter", "
The GET
parameter string
must be specified.
It is strongly recommended that you utilise this page via a private or incognito window in order to prevent your password from appearing in your browser history.
")); } else { exit(page_renderer::render_main("Hashed string", "Algorithm: " . ($settings->use_sha3 ? "sha3" : "sha256") . "
\n" . $_GET["string"] . "
→ " . hash_password($_GET["string"]) . "