org.acegisecurity.providers.encoding
Class ShaPasswordEncoder
java.lang.Object
org.acegisecurity.providers.encoding.BasePasswordEncoder
org.acegisecurity.providers.encoding.BaseDigestPasswordEncoder
org.acegisecurity.providers.encoding.MessageDigestPasswordEncoder
org.acegisecurity.providers.encoding.ShaPasswordEncoder
- All Implemented Interfaces:
- PasswordEncoder
public class ShaPasswordEncoder
- extends MessageDigestPasswordEncoder
SHA implementation of PasswordEncoder.
If a null password is presented, it will be treated as an empty String ("")
password.
As SHA is a one-way hash, the salt can contain any characters.
The default strength for the SHA encoding is SHA-1. If you wish to use higher strengths use the argumented constructor.
ShaPasswordEncoder(int strength)
The applicationContext example...
<bean id="passwordEncoder" class="org.acegisecurity.providers.encoding.ShaPasswordEncoder">
<constructor-arg value="256"/>
</bean>
- Version:
- $Id: ShaPasswordEncoder.java 1527 2006-05-31 03:03:18Z raykrueger $
- Author:
- Ray Krueger, colin sampaleanu, Ben Alex
|
Constructor Summary |
ShaPasswordEncoder()
Initializes the ShaPasswordEncoder for SHA-1 strength |
ShaPasswordEncoder(int strength)
Initialize the ShaPasswordEncoder with a given SHA stength as supported by the JVM
EX: ShaPasswordEncoder encoder = new ShaPasswordEncoder(256); initializes with SHA-256 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ShaPasswordEncoder
public ShaPasswordEncoder()
- Initializes the ShaPasswordEncoder for SHA-1 strength
ShaPasswordEncoder
public ShaPasswordEncoder(int strength)
- Initialize the ShaPasswordEncoder with a given SHA stength as supported by the JVM
EX:
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256); initializes with SHA-256
- Parameters:
strength - EX: 1, 256, 384, 512
Copyright © 2004-2006 Acegi Technology Pty Limited. All Rights Reserved.