Test method for 'BCrypt.gensalt()'
()
| 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)' |