original_string: public static function hash_password($password) {
  	$exception = bootstrap::get_library('exception');
  	
  	if (mb_strlen($password) < self::MINIMUM_LENGTH) {
  		throw new $exception('passwords need a minimum length of '.self::MINIMUM_LENGTH);
  	}
  	
  	$hash = password_hash($password, PASSWORD_DEFAULT);
  	if (empty($hash)) {
  		throw new $exception('unable to hash password');
  	}
  	
  	return $hash;
  }
code: public static function hash_password($password) {
  	$exception = bootstrap::get_library('exception');
  	
  	if (mb_strlen($password) < self::MINIMUM_LENGTH) {
  		throw new $exception('passwords need a minimum length of '.self::MINIMUM_LENGTH);
  	}
  	
  	$hash = password_hash($password, PASSWORD_DEFAULT);
  	if (empty($hash)) {
  		throw new $exception('unable to hash password');
  	}
  	
  	return $hash;
  }
code_tokens: public static function hash_password ( $ password ) { $ exception = bootstrap :: get_library ( 'exception' ) ; if ( mb_strlen ( $ password ) < self :: MINIMUM_LENGTH ) { throw new $ exception ( 'passwords need a minimum length of ' . self :: MINIMUM_LENGTH ) ; } $ hash = password_hash ( $ password , PASSWORD_DEFAULT ) ; if ( empty ( $ hash ) ) { throw new $ exception ( 'unable to hash password' ) ; } return $ hash ; }
docstring: generates a new hash for the given password
  we wrap the native method to ensure a successful hash
  
  also enforces a minimum length for passwords
  @see ::MINIMUM_LENGTH
  
  @param  string $password
  @return string
docstring_tokens: generates a new hash for the given password we wrap the native method to ensure a successful hash