0
I’m saving the passwords in the hashed database, and now I want to view it in the view, because when I get the data in the database it still gets hashed when I’m going to display it.
Senha: $2y$10$G9poHdud5XJxgiQq1p0syOMEgE.wNxBwZWoA8ux.KxsnXPf4tDKni
(at the bank)
Senha: 123
(this is the password I registered in the bank)
How the password is saved in the bank:
public function CadastroSalvar (Request $request) {
$data = $request->all();
$data['password'] = bcrypt($data['senha']); //primeiro campo é do banco e o outro é o campo da Request
$data = \App\Usuario::create($data);
return redirect()->route('UsuarioCadastro');
}
That’s right, you should not store the password in 'Plain text' (as it is). https://answall.com/questions/162369/qual-a-diff%C3%A7a-between-code%C3%A7%C3%A3o-crypto-e-c%C3%A1lculo-hash/162376#162376, https://answall.com/questions/2402/comore-fazer-hash-de-passwords-security/2404#2404 . Basically, not even the system administrators themselves should have access to them. The hash is unidirectional, not reversible, just to compare with other generated hashs
– Miguel
the objective of hash is not to be decrypted :)
– Ricardo Pontual
kkkk' serio man
– Joan Marcos
vlw man I’ll take a look at what I can do here
– Joan Marcos
Why do you want to see the password in the view? what?
– Leandro
kk' change the password, but I will do it differently kkk'
– Joan Marcos
has algorithms q vc can decrypt later, but in the case of passwords the most recommending is the same hash. It does not recover, just compare to see if you are right and if you need to "recover", you generate a new :)
– Ricardo Pontual
yes yes, vlw man, that’s what I intend to do
– Joan Marcos