Why my web hosting not support password encryption

i have login register api server.
when i register user with hash password encryption on localhost it works

{"error":false,"uid":"60f93d4cc98505.60437371","user":{"nama":"tes register 1","email":"treg1@email.com"}}

but, i register user with hash password encryption on my web hosting(free hosting on 000webhost) it not work

{"error":true,"error_msg":"register tidak berhasil"}

there is hash encryption method/function :

public function hashSSHA($password) {

    $salt = sha1(rand());
    $salt = substr($salt, 0, 10);
    $encrypted = base64_encode(sha1($password . $salt, true) . $salt);
    $hash = array("salt" => $salt, "encrypted" => $encrypted);
    return $hash;
}


Read more here: https://stackoverflow.com/questions/68490890/why-my-web-hosting-not-support-password-encryption

Content Attribution

This content was originally published by Galih Mayangga at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: