|
Spring Security Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.security.providers.encoding.BasePasswordEncoder org.springframework.security.providers.encoding.BaseDigestPasswordEncoder org.springframework.security.providers.encoding.MessageDigestPasswordEncoder org.springframework.security.providers.encoding.ShaPasswordEncoder
public class ShaPasswordEncoder
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.springframework.security.providers.encoding.ShaPasswordEncoder"> <constructor-arg value="256"/> </bean>
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 |
Method Summary |
---|
Methods inherited from class org.springframework.security.providers.encoding.MessageDigestPasswordEncoder |
---|
encodePassword, getAlgorithm, getMessageDigest, isPasswordValid |
Methods inherited from class org.springframework.security.providers.encoding.BaseDigestPasswordEncoder |
---|
getEncodeHashAsBase64, setEncodeHashAsBase64 |
Methods inherited from class org.springframework.security.providers.encoding.BasePasswordEncoder |
---|
demergePasswordAndSalt, mergePasswordAndSalt |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShaPasswordEncoder()
public ShaPasswordEncoder(int strength)
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
initializes with SHA-256
strength
- EX: 1, 256, 384, 512
|
Spring Security Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |