@Test void testHashWithMistakesDisabled() { String plaintext = "Password"; String hashed = hashService.hash(plaintext); assertTrue(hashService.isMatch(plaintext, hashed)); String capsLock = "pASSWORD"; assertFalse(hashService.isMatch(capsLock, hashed)); String extraFirstCharacter = "*Password"; assertFalse(hashService.isMatch(extraFirstCharacter, hashed)); String extraLastCharacter = "Password-"; assertFalse(hashService.isMatch(extraLastCharacter, hashed)); String firstCharacterCaseSwap = "password"; assertFalse(hashService.isMatch(firstCharacterCaseSwap, hashed)); }
@Override public String hash(String plaintext) { return plaintext; }
SimpleHashService extends HashService { @Override public String hash(String plaintext) { return plaintext; } }
SimpleHashService extends HashService { @Override public String hash(String plaintext) { return plaintext; } SimpleHashService(boolean serverSideHashEnabled, boolean allowCommonMistakes); }
SimpleHashService extends HashService { @Override public String hash(String plaintext) { return plaintext; } SimpleHashService(boolean serverSideHashEnabled, boolean allowCommonMistakes); @Override String hash(String plaintext); }
SimpleHashService extends HashService { @Override public String hash(String plaintext) { return plaintext; } SimpleHashService(boolean serverSideHashEnabled, boolean allowCommonMistakes); @Override String hash(String plaintext);  }