Package org.apereo.cas.util.crypto
Class GlibcCryptPasswordEncoder
- java.lang.Object
-
- org.apereo.cas.util.crypto.GlibcCryptPasswordEncoder
-
- All Implemented Interfaces:
org.springframework.security.crypto.password.PasswordEncoder
public class GlibcCryptPasswordEncoder extends java.lang.Object implements org.springframework.security.crypto.password.PasswordEncoderThis isGlibcCryptPasswordEncoder.- Since:
- 5.3.10
-
-
Constructor Summary
Constructors Constructor Description GlibcCryptPasswordEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringencode(java.lang.CharSequence password)booleanmatches(java.lang.CharSequence rawPassword, java.lang.String encodedPassword)Special note on DES UnixCrypt: In DES UnixCrypt, so first two characters of the encoded password are the salt.
-
-
-
Method Detail
-
encode
public java.lang.String encode(java.lang.CharSequence password)
- Specified by:
encodein interfaceorg.springframework.security.crypto.password.PasswordEncoder
-
matches
public boolean matches(java.lang.CharSequence rawPassword, java.lang.String encodedPassword)Special note on DES UnixCrypt: In DES UnixCrypt, so first two characters of the encoded password are the salt.When you change your password, the
/bin/passwdprogram selects a salt based on the time of day. The salt is converted into a two-character string and is stored in the/etc/passwdfile along with the encrypted"password."[10]In this manner, when you type your password at login time, the same salt is used again. UNIX stores the salt as the first two characters of the encrypted password.- Specified by:
matchesin interfaceorg.springframework.security.crypto.password.PasswordEncoder- Parameters:
rawPassword- the raw password as it was providedencodedPassword- the encoded password.- Returns:
- true/false
-
-