ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
PasswordHasher.php
Go to the documentation of this file.
1
<?php
36
class
PHPExcel_Shared_PasswordHasher
37
{
48
public
static
function
hashPassword
($pPassword =
''
) {
49
$password
= 0x0000;
50
$charPos = 1;
// char position
51
52
// split the plain text password in its component characters
53
$chars = preg_split(
'//'
, $pPassword, -1, PREG_SPLIT_NO_EMPTY);
54
foreach
($chars as $char) {
55
$value = ord($char) << $charPos++;
// shifted ASCII value
56
$rotated_bits = $value >> 15;
// rotated bits beyond bit 15
57
$value &= 0x7fff;
// first 15 bits
58
$password
^= ($value | $rotated_bits);
59
}
60
61
$password
^= strlen($pPassword);
62
$password
^= 0xCE4B;
63
64
return
(strtoupper(dechex(
$password
)));
65
}
66
}
PHPExcel_Shared_PasswordHasher
Definition:
PasswordHasher.php:36
$password
$password
Definition:
pwgen.php:17
PHPExcel_Shared_PasswordHasher\hashPassword
static hashPassword($pPassword='')
Create a password hash from a given string.
Definition:
PasswordHasher.php:48
libs
composer
vendor
phpoffice
phpexcel
Classes
PHPExcel
Shared
PasswordHasher.php
Generated on Sat Aug 30 2025 19:01:07 for ILIAS by
1.8.13 (using
Doxyfile
)