java.lang.Object | ||||
↳ | org.springframework.security.authentication.encoding.BasePasswordEncoder | |||
↳ | org.springframework.security.authentication.encoding.BaseDigestPasswordEncoder | |||
↳ | org.springframework.security.authentication.encoding.MessageDigestPasswordEncoder | |||
↳ | org.springframework.security.authentication.encoding.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)
The applicationContext example...
<bean id="passwordEncoder" class="org.springframework.security.authentication.encoding.ShaPasswordEncoder"> <constructor-arg value="256"/> </bean>
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Initializes the ShaPasswordEncoder for SHA-1 strength
| |||||||||||
Initialize the ShaPasswordEncoder with a given SHA stength as supported by the JVM
EX:
ShaPasswordEncoder encoder = new ShaPasswordEncoder(256); initializes with SHA-256 |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.security.authentication.encoding.MessageDigestPasswordEncoder
| |||||||||||
From class
org.springframework.security.authentication.encoding.BaseDigestPasswordEncoder
| |||||||||||
From class
org.springframework.security.authentication.encoding.BasePasswordEncoder
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.springframework.security.authentication.encoding.PasswordEncoder
|
Initializes the ShaPasswordEncoder for SHA-1 strength
Initialize the ShaPasswordEncoder with a given SHA stength as supported by the JVM
EX: ShaPasswordEncoder encoder = new ShaPasswordEncoder(256);
initializes with SHA-256
strength | EX: 1, 256, 384, 512 |
---|