与 Java 和 PHP 兼容的密码哈希

Password hashing compatible with Java and PHP(与 Java 和 PHP 兼容的密码哈希)

本文介绍了与 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)

相关主题:

  • 如何使用 bcrypt 对密码进行哈希处理PHP?

资源:

  • 恐怖编码 - 速度散列
  • 安全堆栈交换 - 有没有安全专家推荐bcrypt 用于密码存储?

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

本文标题为:与 Java 和 PHP 兼容的密码哈希

基础教程推荐