ILIAS
Release_4_0_x_branch Revision 61816
◀ ilDoc Overview
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Groups
Pages
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
$i = 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) << $i;
// 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
++$i;
60
}
61
62
$password
^= strlen($pPassword);
63
$password
^= 0xCE4B;
64
65
return
(strtoupper(dechex(
$password
)));
66
}
67
}
Services
Excel
classes
PHPExcel
Shared
PasswordHasher.php
Generated on Wed Apr 27 2016 19:01:37 for ILIAS by
1.8.1.2 (using
Doxyfile
)