What is the hash generation algorithm that Laravel uses?


By default Laravel already comes with a pre-ready authentication system, however, someone would know to tell me what the default algorithm this framework uses for hash and what version thereof?

asked by anonymous 01.03.2017 / 14:04

1 answer


According to documentation , for this type of task, BCrypt , which matches a ask about secure passwords here . Example:

namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use App\Http\Controllers\Controller;
class UpdatePasswordController extends Controller {
     * Update the password for the user.
     * @param  Request  $request
     * @return Response
    public function update(Request $request) {
        // Validate the new password length...
            'password' => Hash::make($request->newPassword)

I placed it on GitHub for future reference .

01.03.2017 / 14:15