Test method for 'BCrypt.checkpw(String, String)' expecting failure
()
| 162 | * expecting failure |
| 163 | */ |
| 164 | public void testCheckpw_failure() { |
| 165 | System.out.print("BCrypt.checkpw w/ bad passwords: "); |
| 166 | for (int i = 0; i < test_vectors.length; i++) { |
| 167 | int broken_index = (i + 4) % test_vectors.length; |
| 168 | String plain = test_vectors[i][0]; |
| 169 | String expected = test_vectors[broken_index][2]; |
| 170 | assertFalse(BCrypt.checkpw(plain, expected)); |
| 171 | System.out.print("."); |
| 172 | } |
| 173 | System.out.println(""); |
| 174 | } |
| 175 | |
| 176 | /** |
| 177 | * Test for correct hashing of non-US-ASCII passwords |