use of org.apereo.cas.configuration.model.core.authentication.PasswordEncoderProperties in project cas by apereo.
the class DefaultPasswordEncoderTests method verifyPasswordEncoderBySHA1.
@Test
public void verifyPasswordEncoderBySHA1() {
final PasswordEncoderProperties p = new PasswordEncoderProperties();
p.setType(PasswordEncoderProperties.PasswordEncoderTypes.DEFAULT.name());
p.setEncodingAlgorithm("SHA-1");
p.setCharacterEncoding("UTF-8");
final PasswordEncoder e = Beans.newPasswordEncoder(p);
assertTrue(e.matches("asd123", "2891baceeef1652ee698294da0e71ba78a2a4064"));
}
Aggregations