RELEASE 1.0.0
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
$Id: createlm.php,v 1.2.2.1 2006/04/29 07:31:08 wurley Exp $
|
||||
$Id: createlm.php,v 1.2 2005/10/23 01:05:41 wurley Exp $
|
||||
|
||||
This code is part of LDAP Account Manager (http://www.sourceforge.net/projects/lam)
|
||||
Copyright (C) 2004 Roland Gruber
|
||||
@@ -133,14 +133,6 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5
|
||||
array( 7, 11, 4, 1, 9, 12, 14, 2, 0, 6, 10, 13, 15, 3, 5, 8),
|
||||
array( 2, 1, 14, 7, 4, 10, 8, 13, 15, 12, 9, 0, 3, 5, 6, 11)));
|
||||
|
||||
/**
|
||||
* Fixes too large numbers
|
||||
*/
|
||||
function x($i) {
|
||||
if ($i < 0) return 4294967296 - $i;
|
||||
else return $i;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param integer count
|
||||
* @param array $data
|
||||
@@ -343,11 +335,7 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5
|
||||
# Support functions
|
||||
# Ported from SAMBA/source/lib/md4.c:F,G and H respectfully
|
||||
function F($X, $Y, $Z) {
|
||||
$ret = (($X&$Y) | ((~((int)$X))&$Z));
|
||||
if ($this->x($ret) > 4294967296) {
|
||||
$ret = (2*4294967296) - $this->x($ret);
|
||||
}
|
||||
return $ret;
|
||||
return ($X&$Y) | ((~$X)&$Z);
|
||||
}
|
||||
|
||||
function G($X, $Y, $Z) {
|
||||
@@ -480,9 +468,6 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5
|
||||
$sum[1] &= 0xffff;
|
||||
$sum[0] &= 0xffff;
|
||||
$ret = ($sum[0]<<16) | $sum[1];
|
||||
if ($this->x($ret) > 4294967296) {
|
||||
$ret = (2*4294967296) - $this->x($ret);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@@ -508,14 +493,7 @@ var $sbox = array(array(array(14, 4, 13, 1, 2, 15, 11, 8, 3, 10, 6, 12, 5
|
||||
# Renamed to prevent clash with SAMBA/source/libsmb/smbdes.c:lshift
|
||||
function md4lshift($x, $s) {
|
||||
$x &= 0xFFFFFFFF;
|
||||
if ($this->x($x) > 4294967296) {
|
||||
$x = (2*4294967296) - $this->x($x);
|
||||
}
|
||||
$ret = ((($x<<$s)&0xFFFFFFFF) | $this->unsigned_shift_r($x, (32-$s)));
|
||||
if ($this->x($ret) > 4294967296) {
|
||||
$ret = (2*4294967296) - $this->x($ret);
|
||||
}
|
||||
return $ret;
|
||||
return ((($x<<$s)&0xFFFFFFFF) | $this->unsigned_shift_r($x, (32-$s)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user