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

Method testHashpw

spec/TestBCrypt.java:97–108  ·  view source on GitHub ↗

Test method for 'BCrypt.hashpw(String, String)'

()

Source from the content-addressed store, hash-verified

95 * Test method for 'BCrypt.hashpw(String, String)'
96 */
97 public void testHashpw() {
98 System.out.print("BCrypt.hashpw(): ");
99 for (int i = 0; i < test_vectors.length; i++) {
100 String plain = test_vectors[i][0];
101 String salt = test_vectors[i][1];
102 String expected = test_vectors[i][2];
103 String hashed = BCrypt.hashpw(plain, salt);
104 assertEquals(hashed, expected);
105 System.out.print(".");
106 }
107 System.out.println("");
108 }
109
110 /**
111 * Test method for 'BCrypt.gensalt(int)'

Callers

nothing calls this directly

Calls 1

hashpwMethod · 0.95

Tested by

no test coverage detected