lprimak commented on issue #1022:
URL: https://github.com/apache/shiro/issues/1022#issuecomment-1877273089

   try this and use the result in `passwordsMatch()` method
   ```
           Hash toHash(String encryptedPassword) {
               if (getHashFormatFactory().getInstance(encryptedPassword) 
instanceof ParsableHashFormat phf) {
                   if (phf.parse(encryptedPassword) instanceof SimpleHash sh) {
                       sh.setSalt(ByteSource.Util.bytes(new byte[0]));
                       sh.setIterations(1);
                       return sh;
                   }
               }
               throw new IllegalArgumentException("Invalid encrypted password");
           }
   ```


-- 
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]

Reply via email to