sam2099 commented on issue #1022:
URL: https://github.com/apache/shiro/issues/1022#issuecomment-1874984863
@lprimak Thanks ! I can not re-open it.
```java
public class EncryptTest {
@Test
void encryptPassword() {
DefaultPasswordService passwordService = new
DefaultPasswordService();
passwordService.setHashService(new HS());
passwordService.setHashFormat(new Shiro1CryptFormat());
System.out.println(passwordService.encryptPassword("hello123"));
}
private final static class HS extends DefaultHashService {
HS() {
setDefaultAlgorithmName("SHA-256");
}
}
}
```
result is
```java
$shiro1$SHA-512$50000$W7dSfsTHQFdLvuBKzq8EfA==$754vzFx0/pcYR4JGL2I24PIw+I8Ba5oqD4pHhEsVezK9MOP41B6ZJH4+mkxHDxTBxVQ2T90RQZ8F1T/7Bl45nw==
```
I set "SHA-256" but output is "SHA-512" !!!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]