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

Method testGensaltInt

spec/TestBCrypt.java:113–127  ·  view source on GitHub ↗

Test method for 'BCrypt.gensalt(int)'

()

Source from the content-addressed store, hash-verified

111 * Test method for 'BCrypt.gensalt(int)'
112 */
113 public void testGensaltInt() {
114 System.out.print("BCrypt.gensalt(log_rounds):");
115 for (int i = 4; i <= 12; i++) {
116 System.out.print(" " + Integer.toString(i) + ":");
117 for (int j = 0; j < test_vectors.length; j += 4) {
118 String plain = test_vectors[j][0];
119 String salt = BCrypt.gensalt(i);
120 String hashed1 = BCrypt.hashpw(plain, salt);
121 String hashed2 = BCrypt.hashpw(plain, hashed1);
122 assertEquals(hashed1, hashed2);
123 System.out.print(".");
124 }
125 }
126 System.out.println("");
127 }
128
129 /**
130 * Test method for 'BCrypt.gensalt()'

Callers

nothing calls this directly

Calls 2

gensaltMethod · 0.95
hashpwMethod · 0.95

Tested by

no test coverage detected