Base for digest password encoders.
This class can be used stand-alone, or one of the subclasses can be used for compatiblity and convenience.
When using this class directly you must specify a
Message Digest Algorithm to use as a constructor arg
The encoded password hash is normally returned as Hex (32 char) version of the hash bytes.
Setting the encodeHashAsBase64 property to true will cause the encoded pass to be returned
as Base64 text, which will consume 24 characters.
See
BaseDigestPasswordEncoder.setEncodeHashAsBase64(boolean)
This PasswordEncoder can be used directly as in the following example:
<bean id="passwordEncoder" class="org.acegisecurity.providers.encoding.MessageDigestPasswordEncoder">
<constructor-arg value="MD5"/>
</bean>
author: Ray Krueger since: 1.0.1 |