MCPcopy Index your code
hub / github.com/bcrypt-ruby/bcrypt-ruby / testCheckpw_failure

Method testCheckpw_failure

spec/TestBCrypt.java:164–174  ·  view source on GitHub ↗

Test method for 'BCrypt.checkpw(String, String)' expecting failure

()

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

checkpwMethod · 0.95

Tested by

no test coverage detected