예제 #1
0
파일: Hash.php 프로젝트: cygnite/framework
 /**
  * @return static BCrypt Instance
  */
 public static function instance()
 {
     if (isset(static::$cache['hash']) && is_object(static::$cache['hash'])) {
         return static::$cache['hash'];
     }
     return static::$cache['hash'] = BCrypt::make();
 }
예제 #2
0
파일: user.php 프로젝트: 188383/project2
 function __construct()
 {
     parent::__construct();
     $this->user = new \DB\SQL\Mapper($this->db, 'users');
     $this->audit = \Audit::instance();
     $this->bcrypt = \BCrypt::instance();
 }
예제 #3
0
 private static function getInstance()
 {
     if (self::$instance == null) {
         include_once Wave_Config::get('wave')->path->vendors . 'phpass-1.3' . DS . 'PasswordHash.php';
         self::$instance = new PasswordHash(12, false);
     }
     return self::$instance;
 }