Package org.keycloak.models.utils
Class SHAPasswordEncoder
- java.lang.Object
-
- org.keycloak.models.utils.SHAPasswordEncoder
-
public class SHAPasswordEncoder extends Object
Password that uses SHA to encode passwords. You can always change the SHA strength by specifying a valid integer when creating a new instance.
Passwords are returned with a Base64 encoding.
- Author:
- Pedro Silva
-
-
Constructor Summary
Constructors Constructor Description SHAPasswordEncoder(int strength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
encode(String rawPassword)
protected MessageDigest
getMessageDigest()
int
getStrength()
boolean
verify(String rawPassword, String encodedPassword)
-
-
-
Method Detail
-
getMessageDigest
protected final MessageDigest getMessageDigest() throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getStrength
public int getStrength()
-
-