首页  >  文章  >  后端开发  >  _bc_crypt 的php变换

_bc_crypt 的php变换

WBOY
WBOY原创
2016-06-13 12:08:001109浏览

__bc_crypt 的php转换

<?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";

?

?

__bc_crypt '123456'+'2bed6aeceef9c65ce5ae91725927b203e907dcb4df0b63fde0329cad97d1e7cfb96532632ee84d7f61ed49606c31a8b381b97bd250fbb6c0470c8a9a396b65be', '$2a$10$W5sI0xJSsIzDLRmXLnes/e', 10

?

?

参考?http://php.net/manual/zh/function.password-hash.php

https://github.com/codahale/bcrypt-ruby/blob/rel_2_1_2/lib/bcrypt.rb#L50

声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn