Created
January 31, 2015 16:28
-
-
Save chentsulin/e212825eb3ca2448e79c to your computer and use it in GitHub Desktop.
NoHasher for particular case (Don't use in production)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Illuminate\Hashing\HasherInterface; | |
class NoHasher implements HasherInterface { | |
public function make($value, array $options = array()) | |
{ | |
return $value; | |
} | |
public function check($value, $hashedValue, array $options = array()) | |
{ | |
return $value === $hashedValue; | |
} | |
public function needsRehash($hashedValue, array $options = array()) | |
{ | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment