I have this hash class that I need to convert from SHA256 to bcrypt because I'm using it to store passwords. I can't seem to translate the documentation to my situation.
<?php
class Hash{
public static function make($string, $salt = ''){
return hash('sha256', $string . $salt);
}
public static function salt($length){
return mcrypt_create_iv($length);
}
public static function unique(){
return self::make(uniqid());
}
}