douzhang5199 2016-05-30 09:14
浏览 87
已采纳

Silex 2.0:不支持算法“bcrypt”

I have a Silex project where i'm upgrading from Silex 1.3 to Silex 2.0. The project works fine on 1.3 but i'm stuck with a bcryt encryption error since it seems default encoding changed with Silex 2.0.

Silex throw error The algorithm "bcrypt" is not supported with those 2 lines :

$pass_encoder = new MessageDigestPasswordEncoder('bcrypt', true, 13);
$pass = $pass_encoder->encodePassword($si_pass, $si_salt);

I'm using XAMPP with PHP 5.5.28, mcrypt support is enabled and mcrypt_filter support is enabled.

Thanks for any help !

  • 写回答

1条回答 默认 最新

  • douyue8685 2016-05-30 15:48
    关注

    Try to use bcrypt encoder

    $pass_encoder = new \Symfony\Component\Security\Core\Encoder\BCryptPasswordEncoder(13); 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 武汉岩海低应变分析软件,导数据库里不显示波形图
  • ¥15 CreateBitmapFromWicBitmap内存释放问题。
  • ¥30 win c++ socket
  • ¥30 CanMv K210开发板实现功能
  • ¥15 C# datagridview 栏位进度
  • ¥15 vue3页面el-table页面数据过多
  • ¥100 vue3中融入gRPC-web
  • ¥15 kali环境运行volatility分析android内存文件,缺profile
  • ¥15 写uniapp时遇到的问题
  • ¥15 vs 2008 安装遇到问题