<?php$plain = '123456'.'2bed6aeceef9c65ce5ae91725927b203e907dcb4df0b63fde0329cad97d1e7cfb96532632ee84d7f61ed49606c31a8b381b97bd250fbb6c0470c8a9a396b65be';$options = [ 'cost' => 10, 'salt' => '$2a$10$W5sI0xJSsIzDLRmXLnes/e',];echo password_hash($plain, PASSWORD_BCRYPT, $options);echo "\n";$salt = '$2a$10$W5sI0xJSsIzDLRmXLnes/e';echo crypt($plain, $salt);echo "\n";
Copier après la connexion
?
?
__bc_crypt '123456'+'2bed6aeceef9c65ce5ae91725927b203e907dcb4df0b63fde0329cad97d1e7cfb96532632ee84d7f61ed49606c31a8b381b97bd250fbb6c0470c8a9a396b65be', '$2a$10$W5sI0xJSsIzDLRmXLnes/e', 10
Copier après la connexion
?
?
参考?http://php.net/manual/zh/function.password-hash.php
https://github.com/codahale/bcrypt-ruby/blob/rel_2_1_2/lib/bcrypt.rb#L50