I'm using on php server function crypt like this:

```
$hash = crypt($password, '$2y$10$' . $salt);

```

It makes hash of password by Blowfish method.

I'm looking for java equivalent for crypt password.

I found this code, but I don't know where add $salt. More above:

```
String key = "abcd";
SecretKeySpec keySpec = new SecretKeySpec(key.getBytes(), "Blowfish");
Cipher cipher = Cipher.getInstance("Blowfish");
cipher.init(cipher.ENCRYPT_MODE, keySpec);
return DatatypeConverter.printBase64Binary(cipher.doFinal(key.getBytes()));

```

Thank's for every idea or answer.