use mcrypt_encrypt function to use blowfish cipher .
$key = pack('H*', "bcb04b7e103a0cd8b54763051cef08bc55abe029fdebae5e1d417e2ffb2a00a3");
$plaintext = "This string was AES-256 / CBC / ZeroBytePadding encrypted.";
$iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
echo $ciphertext = mcrypt_encrypt(MCRYPT_BLOWFISH , $key,
$plaintext, MCRYPT_MODE_CBC,$iv);
Twofish cipher , Threefish cipher , MacGuffin cipher , Advanced Encryption Standard AES cipher , many are there.
but i dont recommend this use of blowfish to hash the password . use md5 or password_hash instead .
md5
$passwordhash=md5("security");
password_hash
$iv_size = mcrypt_get_iv_size(MCRYPT_BLOWFISH, MCRYPT_MODE_CBC);
$iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
$options = array('cost' => 11, 'salt' => $iv );
password_hash("security", PASSWORD_BCRYPT, $options)."\n";