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