Giter Club home page Giter Club logo

mcrypthasher's Introduction

McryptHasher

Mcrypt Hasher For Laravel Auth

This package will replace Laravel's default hash service provider.

Installation

  1. composer require brokerexchange/mcrypthasher

  2. (Optional) Publish the config

    • php artisan vendor:publish --tag=mcrypt
  3. (Optional) Add MCRYPT_KEY to your .env file

    • MCRYPT_KEY='My awesome hash key'

note: this step is optional because APP_KEY will be used if MCRYPT_KEY is not provided in your project.

  1. If you are using Laravel 5.5+, this package will be auto-discovered. Otherwise, add McryptHasher\McryptHasherServiceProvider::class, to config/app.php
<?php
    // ...

     /*
     * Package Service Providers...
      */
      McryptHasher\McryptHasherServiceProvider::class

    // ...
  1. In the config/hashing.php file update the driver value to 'mcrypt':
<?php

   return [
       // ...
       
       'driver' => 'mcrypt',
   
       // ...
   ];

Usage

Once installed the mcrypt hasher will automatically be used during authentication and registration. If you wish to use the package manually, you may now use the Hash facade. ex: Hash::make('12345')

If you wish to continue using other hash drivers, add a driver function call to the Hash facade chain. ex: Hash::driver('bcrypt')->make('12345')

Copyright © 2023 Broker Exchange Network

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.