比较Liferay的加密密码和用户输入 [英] Compare Liferay's encrypted passwords and user input

查看:486
本文介绍了比较Liferay的加密密码和用户输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理一个显示存储在Liferay数据库中的信息的应用程序。为了做到这一点,我做了一个Web服务,使用Java从数据库读取数据。所有查询进行顺利,但需要登录部分。问题是密码是加密的,我不知道如何比较用户给出的密码和我在数据库中加密的密码。

I'm working on an application that shows information stored on a Liferay database. For doing that I made a web service, using Java, that reads data from the database. All queries are going well but I need a login section. The issue is that the password is encrypted and I don't know how to compare the password given by the user and the passwords I have in the database, that are encrypted.

编辑 passwords.encryption.algorithm 具有默认值: PBKDF2WithHmacSHA1 / 160/128000

任何建议?

推荐答案

有一个实用程序类的密码比较。

There's a utility class for password comparison.

PasswordTrackerLocalServiceUtil#isSameAsCurrentPassword(userId,newClearTextPwd)

这篇关于比较Liferay的加密密码和用户输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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