src/APR1_MD5.php
public static function salt() {
        $alphabet = self::APRMD5_ALPHABET;
        $salt = '';
        for($i=0; $i<8; $i++) {
            $offset = hexdec(bin2hex(openssl_random_pseudo_bytes(1))) % 64;
            $salt .= $alphabet[$offset];
        }
        return $salt;
    }
public static function salt() {
        $alphabet = self::APRMD5_ALPHABET;
        $salt = '';
        for($i=0; $i<8; $i++) {
            $offset = hexdec(bin2hex(openssl_random_pseudo_bytes(1))) % 64;
            $salt .= $alphabet[$offset];
        }
        return $salt;
    }
public static function salt ( ) { $ alphabet = self :: APRMD5_ALPHABET ; $ salt = '' ; for ( $ i = 0 ; $ i < 8 ; $ i ++ ) { $ offset = hexdec ( bin2hex ( openssl_random_pseudo_bytes ( 1 ) ) ) % 64 ; $ salt .= $ alphabet [ $ offset ] ; } return $ salt ; }
8 character salts are the best. Don't encourage anything but the best.
8 character salts are the best . Don t encourage anything but the best .