PHP Securitywise Why is md5 no longer considered safe?

For a long time as a php developer, I used the md5 hash algorithm to protect password data and create unique hash algorithms.

However, from the last few months I have heard rumors that md5 is no longer considered safe, I like to know why?

What are the alternatives for password authentication, i.e. SHA1, password_hash () in PHP 5.5? And I like to know why these alternatives are considered the best choice now for several days, because for me most of them are again another hashing algorithm ...

+4
source share
2 answers

- research studies , md5() , !

....

enter image description here

password_hash() PHP 5.5, crypt() , .

password_hash(), PHP

<?php
$options = [
    'cost' => 12,
];
echo password_hash("rasmuslerdorf", PASSWORD_BCRYPT, $options)."\n";
?>

crypt, BLOWFISH

if (CRYPT_BLOWFISH == 1) {
    echo 'Blowfish:     ' . crypt('rasmuslerdorf', '$2a$07$usesomesillystringforsalt$') . "\n";
}

EDIT :

md5()?

, MD5, SHA1 SHA256, . , " " , . - , "" , .

password_hash() PHP 5.5?

. , . PHP 5.5 API , password_hash(), .

Source

+2

. ( , ), - , = .

SHA-256/SHA-512 - , , , , . , , , .

+1

Source: https://habr.com/ru/post/1529742/


All Articles