Есть Хеш, типа : Blowfish(OpenBSD) $2y$10$DdZ/I5Mwb3ciO0Ux6acw4eFnQh5Z0zbiMSVtscpaw15LsxPQgvV1S Где сам хеш, а где соль. Или это целый хеш?
Format label bcrypt Disabled in configuration file no Max. password length in bytes 72 Min. keys per crypt 12 Max. keys per crypt 36 Flags Case sensitive yes Supports 8-bit characters yes Converts 8859-1 to UTF-16/UCS-2 no Honours --encoding=NAME no False positives possible no Uses a bitslice implementation no The split() method unifies case no A $dynamic$ format no A dynamic sized salt no Parallelized with OpenMP yes Poor OpenMP scalability no Number of test vectors 14 Algorithm name Blowfish 32/64 X3 Format name Benchmark comment ("$2a$05", 32 iterations) Benchmark length -1 Binary size 4 Salt size 20 Tunable cost parameters iteration count Example ciphertext $2a$05$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW80a8ba3219e56c775968bfd8302a978a26686ccdba18fac3ea89cc723acb0493937abb31e04c5cd329855f7a6751ccd3b98c5d57f6e7bd5f921f88fb0d04d840553894803bcb Second example: Code: if(defined(('CRYPT_BLOWFISH') && CRYPT_BLOWFISH) { $password = 'blah'; $bytes = mcrypt_create_iv(22, MCRYPT_DEV_URANDOM); $salt = substr(str_replace('+', '.', base64_encode($bytes)), 0, 22); $hash = crypt($password, '$2y$12$'.$salt); }