Drupal 使用什么方法加密来进行用户名和密码身份验证和验证
what methodology encryption drupal has used for username and password authentication and validation
Drupal 站点已迁移到 PHP 框架,
在新数据库中迁移了当前的 drupal 内容,
显示塞子?是登录认证。
drupal 使用什么方法论/加密方法进行用户名和密码的身份验证和验证。
Drupal代码是开源的,在用户认证的情况下,相当容易理解。只需查看源代码(Clive 已经在对 OP 的评论中提供了 link)。
对于 Drupal 核心,用户身份验证是基于密码的。用户身份验证在 user_authenticate()
function. Actual password verification is done in the user_check_password()
function. As one can see, this actually compare hashed passwords (the stored one, and the one provided as clear-text to the function). Password hashes are computed using the _password_crypt()
函数中完成,使用盐和重复散列来提高安全性。
如果您需要 re-use 在 Drupal 之外进行 Drupal 用户身份验证但保持密码不变,您将需要复制 user_check_password()
函数及其所有依赖项。
Drupal 站点已迁移到 PHP 框架,
在新数据库中迁移了当前的 drupal 内容,
显示塞子?是登录认证。
drupal 使用什么方法论/加密方法进行用户名和密码的身份验证和验证。
Drupal代码是开源的,在用户认证的情况下,相当容易理解。只需查看源代码(Clive 已经在对 OP 的评论中提供了 link)。
对于 Drupal 核心,用户身份验证是基于密码的。用户身份验证在 user_authenticate()
function. Actual password verification is done in the user_check_password()
function. As one can see, this actually compare hashed passwords (the stored one, and the one provided as clear-text to the function). Password hashes are computed using the _password_crypt()
函数中完成,使用盐和重复散列来提高安全性。
如果您需要 re-use 在 Drupal 之外进行 Drupal 用户身份验证但保持密码不变,您将需要复制 user_check_password()
函数及其所有依赖项。