From 37535744b269f5f3e5044a23122bacdbfbd84d82 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 21 Nov 2015 22:55:20 -0500 Subject: [PATCH 1/2] small tweaks --- phpseclib/File/ASN1.php | 2 +- phpseclib/Math/BigInteger.php | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/phpseclib/File/ASN1.php b/phpseclib/File/ASN1.php index 8677521b..f5c3e448 100644 --- a/phpseclib/File/ASN1.php +++ b/phpseclib/File/ASN1.php @@ -677,7 +677,7 @@ class File_ASN1 } // Fail mapping if all input items have not been consumed. - return $i < $n? null: $map; + return $i < $n ? null: $map; // the main diff between sets and sequences is the encapsulation of the foreach in another for loop case FILE_ASN1_TYPE_SET: diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 4ab30d83..4ba64240 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -811,6 +811,18 @@ class Math_BigInteger } } + /** + * __debugInfo() magic method + * + * Will be called, automatically, when print_r() or var_dump() are called + * + * @access public + */ + function __debugInfo() + { + return array('value' => '0x' . $this->toHex(true)); + } + /** * Adds two BigIntegers. * From fe404065f17c231744db3c6bcc88a138abf093a0 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Sat, 5 Dec 2015 10:27:51 -0600 Subject: [PATCH 2/2] update identifier to current version --- phpseclib/Net/SSH2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 7cde0875..b393eb72 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1134,7 +1134,7 @@ class Net_SSH2 */ function _generate_identifier() { - $identifier = 'SSH-2.0-phpseclib_0.3'; + $identifier = 'SSH-2.0-phpseclib_1.0'; $ext = array(); if (extension_loaded('openssl')) {