与 Java 和 PHP 兼容的密码哈希 [英] Password hashing compatible with Java and PHP

查看:26
本文介绍了与 Java 和 PHP 兼容的密码哈希的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有我可以在 PHP 和 Java 中轻松使用的安全密码散列库(例如 phpass)或散列方法?

Is there a secure password hashing library (e.g. phpass) or hashing method that I can easily use in both PHP and Java?

推荐答案

如果你想做简单的事情,你可以使用 sha-N with salt.(N 为 1、256 或 512)

If you want do the easy thing, you can use sha-N with salt. (N being 1, 256 or 512)

Jeff Atwood 最近对此发表了一篇不错的博文,称 bcryptPBKDF2 是最好的选择.

Jeff Atwood did a nice blog post on that recently, saying that bcrypt and PBKDF2 are the best options.

在 PHP 中,您可以 使用 bcrypt(在 Java 中也是如此)

In PHP you can use bcrypt (and in Java too)

相关主题:

资源:

这篇关于与 Java 和 PHP 兼容的密码哈希的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆