H
H
Hose10212019-02-04 18:06:12
Laravel
Hose1021, 2019-02-04 18:06:12

How to change the encryption method?

protected function create(array $data)
    {
        return User::create([
            'username' => $data['name'],
            'email' => $data['email'],
            'password' => base64_encode(hash('sha256', $data['password'], true)),
            'last_ip' => $this->last_ip,
        ]);
    }

Registration is successful, but at the entrance These credentials do not match our records. How to change the check for correct password? I changed the encryption method

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2019-02-04
@JhaoDa

Create your own user provider implementation .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question