Version 4.5.0

This commit is contained in:
Neo committed 2025-12-19 05:51:58 -08:00
1 parent 1a0c7fd3c2
commit f79dcf067a
3791 files changed
+248032 -76372

No files matched your search

@@ -1,23 +1,33 @@
<?php
/**
* @brief Converter private crypt hashing
* @author <a href='https://www.invisioncommunity.com'>Invision Power Services, Inc.</a>
* @copyright (c) Invision Power Services, Inc.
* @package Invision Community
* @subpackage convert
* @since 6 May 2016
*/
namespace IPS\convert\Login;
/* To prevent PHP errors (extending class does not exist) revealing path */
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
{
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
exit;
}
/**
* Helper class to facilitate private crypt hashing
*/
class _HashCryptPrivate
{
/**
* Private crypt hashing
*
* @access public
* @param string Password
* @param string Settings
* @param string Hash-lookup
* @param string $password Password
* @param string $setting Settings
* @param string $itoa64 Hash-lookup
* @return string password hash
*/
public function hashCryptPrivate( $password, $setting, &$itoa64 )
@@ -83,10 +93,9 @@ class _HashCryptPrivate
/**
* Private function to encode phpBB3 hash
*
* @access protected
* @param string Input
* @param count Iteration
* @param string Hash-lookup
* @param string $input Input
* @param count $count Iteration
* @param string $itoa64 Hash-lookup
* @return string phpbb3 password hash encoded bit
*/
protected function _hashEncode64($input, $count, &$itoa64)
@@ -96,12 +105,12 @@ class _HashCryptPrivate
do
{
$value = ord( $input[$i++] );
$value = \ord( $input[$i++] );
$output .= $itoa64[$value & 0x3f];
if ( $i < $count )
{
$value |= ord($input[$i]) << 8;
$value |= \ord($input[$i]) << 8;
}
$output .= $itoa64[($value >> 6) & 0x3f];
@@ -113,7 +122,7 @@ class _HashCryptPrivate
if ( $i < $count )
{
$value |= ord($input[$i]) << 16;
$value |= \ord($input[$i]) << 16;
}
$output .= $itoa64[($value >> 12) & 0x3f];