0
0
0xc00000e92019-08-28 18:47:38
PHP
0xc00000e9, 2019-08-28 18:47:38

Is there any sense in such encryption?

Hello. Is there any point in this code, or is it possible to do with simple MD5?
hash('sha256', sha1(md5($password)));

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Maxim_Q, 2019-08-28
@0xc00000e9

there is little sense, use better simple sha256, not MD5. MD5 is not secure and has collisions and is abandoned in most cases. And if possible, add a salt to the password .

S
SagePtr, 2019-08-28
@SagePtr

If you want to hash the password, then there is no point in cycling, use the password_hash and password_verify functions

X
xmoonlight, 2019-08-28
@xmoonlight

In the example, it's enough: hash('sha256', $password);
And rightly so, it's better to use "salt":hash('sha256', $salt.$password.$salt);

A
Anton R., 2019-08-28
@anton_reut

I do like this:

$salt = 'somerandomcharacters';
$password = hash('sha256', $_POST['password'].$salt);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question