为 Kohana 上的用户注册生成密码哈希值

发布于 2024-10-03 10:26:58 字数 253 浏览 0 评论 0原文

我无法在我们的 Kohana 构建的网站应用程序上注册新用户或修改用户密码。我确实可以访问我们的数据库,并且可以在那里更改密码,但我需要一种方法来从系统接受的字符串生成密码哈希值。

如何使用 hash_password(passwordstring, FALSE) 显示应插入数据库的哈希值?

modules/auth/classes/kohana/auth.php 文件中是否有我应该查看的内容?

I can't register new users, or modify user passwords, on our Kohana built website app. I do have access to our database and can change passwords there but I need a way to generate password hashes from strings which will be accepted by the system.

How can I use hash_password(passwordstring, FALSE) to display the hash I should insert into the DB?

Is there anything in the modules/auth/classes/kohana/auth.php file that I should be looking at?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

酒废 2024-10-10 10:26:58

使用echo Auth::instance()->hash_password('新密码')。您不需要传递 $salt 值,因为它会自动生成。

Use echo Auth::instance()->hash_password('new password'). You dont need pass $salt value because it will be generated automatically.

别在捏我脸啦 2024-10-10 10:26:58

Kohana只是一个框架,它不是一个用户系统。您将需要提供 hash_password 函数的代码,因为它看起来像某种库。

Kohana is just a framework, its not a user system. You will need to provide the code for the hash_password function as this looks like a library of some sort.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文