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

Method testGensalt

spec/TestBCrypt.java:132–143  ·  view source on GitHub ↗

Test method for 'BCrypt.gensalt()'

()

Source from the content-addressed store, hash-verified

130 * Test method for 'BCrypt.gensalt()'
131 */
132 public void testGensalt() {
133 System.out.print("BCrypt.gensalt(): ");
134 for (int i = 0; i < test_vectors.length; i += 4) {
135 String plain = test_vectors[i][0];
136 String salt = BCrypt.gensalt();
137 String hashed1 = BCrypt.hashpw(plain, salt);
138 String hashed2 = BCrypt.hashpw(plain, hashed1);
139 assertEquals(hashed1, hashed2);
140 System.out.print(".");
141 }
142 System.out.println("");
143 }
144
145 /**
146 * Test method for 'BCrypt.checkpw(String, String)'

Callers

nothing calls this directly

Calls 2

gensaltMethod · 0.95
hashpwMethod · 0.95

Tested by

no test coverage detected