What is the correct format for a blowfish salt using PHP's crypt?
I have read the information provided on the PHP Manual Entry for crypt() , but I find myself still unsure of the format for a salt to trigger the Blowfish algorithm. According manual entry, I should use '$2$' or '$2a$' as the start of a 16 character string. However, in the example given later, they use a much longer string: ' $2a$07$usesomesillystringforsalt$ ', which indicates to me that whatever string I provide will be sliced and diced to fit the model. The problem I am encountering is actually triggering the Blowfish algo vs STD_DES . Example: $foo = 'foo'; $salt = '$2a$' . hash('whirlpool