掲示板

Default Password Encryption system - Trying to replicate it

12年前 に Gianx Sax によって更新されました。

Default Password Encryption system - Trying to replicate it

New Member 投稿: 5 参加年月日: 11/06/08 最新の投稿
Hi,
I have an installation of Social Office on my local machine and I've configured it to use a mysql db. With MySQL Workbench I discovered a table labelled user_ where are stored all users data, including their encrypted password.
I premise that I know how to change the way Social Office encrypts passwords for new users (I have to use the property file) and I premise also that I'm not a Java programmer.
I'm programming a php application that should use the same Social Office users in order to do the log-in. I want to preserve the default passwords encoding method and I want to implement it into php so I can collect the passwords from my html form, processing them with php and then compare them with Social Office passwords in the db.
I found a file called com.liferay.Encryptor (is it only contained in liferay portal or also in social office?). Thanks to this file I understood that social office use SHA, DES and base64 "protocols", but I don't understand how (also because I don't know java language).
So could you please explain me how social office use SHA, DES and base64 to encrypt passwords so I can replicate the same behaviour in php in order to let the users of my php app to log-in using social office username and password?
I'd be happy to receive a reply from you, valued and expert community members.

I want to learn, but I need your help emoticon
thumbnail
12年前 に Ryan Park によって更新されました。

RE: Default Password Encryption system - Trying to replicate it

Regular Member 投稿: 120 参加年月日: 07/08/28 最新の投稿
Hi Gianx,

Social Office and Liferay in general will use a method specified by the administrator to encrypt the password.

Which you can define by creating [tomcat]/webapps/ROOT/WEB-INF/classes/portal-ext.properties and setting the following key,
ldap.auth.password.encryption.algorithm=


Acceptable values are
CRYPT
MD2
MD5
NONE
SHA
SHA-256
SHA-384
SSHA

By default I believe it is SHA.