mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
- replaced "\t" with " "
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@17 21d32557-59b3-4da0-833f-c5933fad653e
This commit is contained in:
parent
943f329197
commit
01c841a0a0
@ -69,7 +69,7 @@
|
|||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
* @copyright MMVI Jim Wigginton
|
* @copyright MMVI Jim Wigginton
|
||||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||||
* @version $Id: BigInteger.php,v 1.3 2008-03-12 22:03:08 terrafrost Exp $
|
* @version $Id: BigInteger.php,v 1.4 2008-05-25 07:28:57 terrafrost Exp $
|
||||||
* @link http://pear.php.net/package/Math_BigInteger
|
* @link http://pear.php.net/package/Math_BigInteger
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1477,7 +1477,7 @@ class Math_BigInteger {
|
|||||||
|
|
||||||
// if $x is less than 0, the first character of $x is a '-', so we'll remove it. we can do this because
|
// if $x is less than 0, the first character of $x is a '-', so we'll remove it. we can do this because
|
||||||
// $x mod $n == $x mod -$n.
|
// $x mod $n == $x mod -$n.
|
||||||
$n = (bccomp($n->value, '0') < 0) ? substr($n->value, 1) : $n->value;
|
$n = (bccomp($n->value, '0') < 0) ? substr($n->value, 1) : $n->value;
|
||||||
|
|
||||||
if (bccomp($this->value,'0') < 0) {
|
if (bccomp($this->value,'0') < 0) {
|
||||||
$negated_this = new Math_BigInteger();
|
$negated_this = new Math_BigInteger();
|
||||||
@ -1736,7 +1736,7 @@ class Math_BigInteger {
|
|||||||
return new Math_BigInteger($this->toBytes() | $x->toBytes(), 256);
|
return new Math_BigInteger($this->toBytes() | $x->toBytes(), 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->_copy();
|
$result = $this->_copy();
|
||||||
|
|
||||||
$x_length = count($x->value);
|
$x_length = count($x->value);
|
||||||
for ($i = 0; $i < $x_length; $i++) {
|
for ($i = 0; $i < $x_length; $i++) {
|
||||||
@ -1766,7 +1766,7 @@ class Math_BigInteger {
|
|||||||
return new Math_BigInteger($this->toBytes() ^ $x->toBytes(), 256);
|
return new Math_BigInteger($this->toBytes() ^ $x->toBytes(), 256);
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = $this->_copy();
|
$result = $this->_copy();
|
||||||
|
|
||||||
$x_length = count($x->value);
|
$x_length = count($x->value);
|
||||||
for ($i = 0; $i < $x_length; $i++) {
|
for ($i = 0; $i < $x_length; $i++) {
|
||||||
@ -1916,7 +1916,7 @@ class Math_BigInteger {
|
|||||||
*/
|
*/
|
||||||
function random($min = false, $max = false, $generator = 'mt_rand')
|
function random($min = false, $max = false, $generator = 'mt_rand')
|
||||||
{
|
{
|
||||||
if ($min === false) {
|
if ($min === false) {
|
||||||
$min = new Math_BigInteger(0);
|
$min = new Math_BigInteger(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
* @copyright MMVII Jim Wigginton
|
* @copyright MMVII Jim Wigginton
|
||||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||||
* @version $Id: SSH1.php,v 1.8 2008-05-15 17:46:51 terrafrost Exp $
|
* @version $Id: SSH1.php,v 1.9 2008-05-25 07:28:57 terrafrost Exp $
|
||||||
* @link http://phpseclib.sourceforge.net
|
* @link http://phpseclib.sourceforge.net
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -873,7 +873,7 @@ class Net_SSH1 {
|
|||||||
$padding.= chr(crypt_random(0, 255));
|
$padding.= chr(crypt_random(0, 255));
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = $padding . $data;
|
$data = $padding . $data;
|
||||||
$data.= pack('N', $this->_crc($data));
|
$data.= pack('N', $this->_crc($data));
|
||||||
|
|
||||||
if ($this->crypto !== false) {
|
if ($this->crypto !== false) {
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
* @author Jim Wigginton <terrafrost@php.net>
|
* @author Jim Wigginton <terrafrost@php.net>
|
||||||
* @copyright MMVII Jim Wigginton
|
* @copyright MMVII Jim Wigginton
|
||||||
* @license http://www.gnu.org/licenses/lgpl.txt
|
* @license http://www.gnu.org/licenses/lgpl.txt
|
||||||
* @version $Id: SSH2.php,v 1.6 2008-05-21 04:28:09 terrafrost Exp $
|
* @version $Id: SSH2.php,v 1.7 2008-05-25 07:28:57 terrafrost Exp $
|
||||||
* @link http://phpseclib.sourceforge.net
|
* @link http://phpseclib.sourceforge.net
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -432,7 +432,7 @@ class Net_SSH2 {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ord($response[0]) != NET_SSH2_MSG_KEXINIT) {
|
if (ord($response[0]) != NET_SSH2_MSG_KEXINIT) {
|
||||||
user_error('Expected SSH_MSG_KEXINIT', E_USER_NOTICE);
|
user_error('Expected SSH_MSG_KEXINIT', E_USER_NOTICE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -690,7 +690,7 @@ class Net_SSH2 {
|
|||||||
|
|
||||||
list(, $type) = unpack('C', $this->_string_shift($response, 1));
|
list(, $type) = unpack('C', $this->_string_shift($response, 1));
|
||||||
|
|
||||||
if ($type != NET_SSH2_MSG_KEXDH_REPLY) {
|
if ($type != NET_SSH2_MSG_KEXDH_REPLY) {
|
||||||
user_error('Expected SSH_MSG_KEXDH_REPLY', E_USER_NOTICE);
|
user_error('Expected SSH_MSG_KEXDH_REPLY', E_USER_NOTICE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -793,7 +793,7 @@ class Net_SSH2 {
|
|||||||
return $this->_disconnect(NET_SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE);
|
return $this->_disconnect(NET_SSH2_DISCONNECT_HOST_KEY_NOT_VERIFIABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'ssh-rsa':
|
case 'ssh-rsa':
|
||||||
$temp = unpack('Nlength', $this->_string_shift($server_public_host_key, 4));
|
$temp = unpack('Nlength', $this->_string_shift($server_public_host_key, 4));
|
||||||
$e = new Math_BigInteger($this->_string_shift($server_public_host_key, $temp['length']), -256);
|
$e = new Math_BigInteger($this->_string_shift($server_public_host_key, $temp['length']), -256);
|
||||||
@ -847,7 +847,7 @@ class Net_SSH2 {
|
|||||||
|
|
||||||
list(, $type) = unpack('C', $this->_string_shift($response, 1));
|
list(, $type) = unpack('C', $this->_string_shift($response, 1));
|
||||||
|
|
||||||
if ($type != NET_SSH2_MSG_NEWKEYS) {
|
if ($type != NET_SSH2_MSG_NEWKEYS) {
|
||||||
user_error('Expected SSH_MSG_NEWKEYS', E_USER_NOTICE);
|
user_error('Expected SSH_MSG_NEWKEYS', E_USER_NOTICE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -1031,7 +1031,7 @@ class Net_SSH2 {
|
|||||||
|
|
||||||
list(, $type) = unpack('C', $this->_string_shift($response, 1));
|
list(, $type) = unpack('C', $this->_string_shift($response, 1));
|
||||||
|
|
||||||
if ($type != NET_SSH2_MSG_SERVICE_ACCEPT) {
|
if ($type != NET_SSH2_MSG_SERVICE_ACCEPT) {
|
||||||
user_error('Expected SSH_MSG_SERVICE_ACCEPT', E_USER_NOTICE);
|
user_error('Expected SSH_MSG_SERVICE_ACCEPT', E_USER_NOTICE);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user