%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/thread-self/root/www/varak.net/paste.varak.net-5.6/app/lib/hashing/
Upload File :
Create Path :
Current File : //proc/thread-self/root/www/varak.net/paste.varak.net-5.6/app/lib/hashing/PHPassHasher.php

<?php namespace StickyNotes\Hashing;

/**
 * Sticky Notes
 *
 * An open source lightweight pastebin application
 *
 * @package     StickyNotes
 * @author      Sayak Banerjee
 * @copyright   (c) 2014 Sayak Banerjee <mail@sayakbanerjee.com>
 * @license     http://www.opensource.org/licenses/bsd-license.php
 * @link        http://sayakbanerjee.com/sticky-notes
 * @since       Version 1.0
 * @filesource
 */

use Illuminate\Hashing\HasherInterface;
use StickyNotes\PHPass;

/**
 * PHPassHasher Class
 *
 * This class offers a PHPass based hashing mechanism.
 *
 * @package     StickyNotes
 * @subpackage  Facades
 * @author      Sayak Banerjee
 */
class PHPassHasher implements HasherInterface {

	/**
	 * Hash the given value.
	 *
	 * @param  string  $value
	 * @param  array   $options
	 * @return string
	 */
	public function make($value, array $options = array())
	{
		return PHPass::make()->create($value, NULL);
	}

	/**
	 * Check the given plain value against a hash.
	 *
	 * @param  string  $value
	 * @param  string  $hashedValue
	 * @param  array   $options
	 * @return bool
	 */
	public function check($value, $hashedValue, array $options = array())
	{
		return PHPass::make()->check('hasher', $value, NULL, $hashedValue);
	}

	/**
	 * Check if the given hash has been hashed using the given options.
	 *
	 * @param  string  $hashedValue
	 * @param  array   $options
	 * @return bool
	 */
	public function needsRehash($hashedValue, array $options = array())
	{
		return FALSE;
	}

}

Zerion Mini Shell 1.0