Home >Backend Development >PHP Tutorial >_bc_crypt 的php变换

_bc_crypt 的php变换

WBOY
WBOYOriginal
2016-06-13 12:08:001141browse

__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

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn