Recent Changes in PHP
Since I know that it is actually a bcrypt and a password, now I can just tell the people reading this the functions that they should use, instead of manually starting their own salt system.
Use password_hash($input, PASSWORD_DEFAULT);to create a hash suitable for insertion into the database. It will bring you salt.
Insert:
$hash = password_hash($_POST["password"], PASSWORD_DEFAULT, ["cost" => 16]);
DB::table("users")->insert(["username" => $user, "password" => $hash]);
Verification:
$hash = DB::table("users")->fetchByName($username)->select("password");
$input = $_POST["password"];
$verified = password_verify($input, $hash);
PHP 5.5 https://github.com/ircmaxell/password_compat drop-in 1
1 / [number of possible letters/numbers] ** [length]
22 (, , )
1 / (22 ** 60) = 1 / (3.51043 x 10**80)
? .
( : - , ), .
, , - CSPRNG ( ). .
@Guarav , , . UUID ( , 128- ) :
, , . ( , base10, - ). , - . PHP , 1 ( , !)
1: !