Dy
171
3
Laravel

Migrating from laravel password encryption

Posted 1 year ago by Dy

Hey guys. With your help over the past few months i've been able to build a powerful laravel web application but distributing it to my users in an android webView has been proven unpleasant so i decide to migrate to a native app but laravel encrypted passwords using

'password' => bcrypt($data['password']),
and my native app uses
```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;
    }
and stores in mysql using
```$hash = $this->hashSSHA($password);
        $password = $hash["encrypted"];
Now users who signed up while on laravel can't log in with this new encryption system. Is it possible to find grounds where users from laravel can log in?? even if it means resetting their passwords I will really appreciate. Thanks for reading. Bigger thanks for attempting an answer. I know it's a long shot.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.