Liferay的密码管理涉及的东西还不少。首先从配置文件说起。portal.properties中默认的配置如下:
##
## Passwords
##
#
# Set the following encryption algorithm to encrypt passwords. The default
# algorithm is SHA (SHA-1). If set to NONE, passwords are stored in the
# database as plain text. The SHA-512 algorithm is currently unsupported.
#
#passwords.encryption.algorithm=CRYPT
#passwords.encryption.algorithm=MD2
#passwords.encryption.algorithm=MD5
#passwords.encryption.algorithm=NONE
passwords.encryption.algorithm=SHA
#passwords.encryption.algorithm=SHA-256
#passwords.encryption.algorithm=SHA-384
#passwords.encryption.algorithm=SSHA
#
# Digested passwords are encoded via base64 or hex encoding. The default is
# base64.
#
passwords.digest.encoding=base64
#passw