I solved the problem. My default locale is TR_tr
. When i run the program without changing the default locale it outputs false
.
But when i run the program as below (it sets the default locale to ENGLISH) it outputs true
public class App {
public static void main(String[] args) {
PasswordService psd = new DefaultPasswordService();
String password = "333";
String enc = psd.encryptPassword(password);
Locale.setDefault(Locale.ENGLISH);
System.out.println(Locale.getDefault());
System.out.print(psd.passwordsMatch(password, enc));
}
}