Skip to content

Instantly share code, notes, and snippets.

@chentsulin
Created January 31, 2015 16:28
Show Gist options
  • Save chentsulin/e212825eb3ca2448e79c to your computer and use it in GitHub Desktop.
Save chentsulin/e212825eb3ca2448e79c to your computer and use it in GitHub Desktop.
NoHasher for particular case (Don't use in production)
<?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