From 380517ef00a1acd129241fec9c65fa1cb1bf2a39 Mon Sep 17 00:00:00 2001 From: "luz.paz" Date: Sat, 3 Mar 2018 07:07:14 -0500 Subject: [PATCH] Misc. trivial typos Found via `codespell -q 3` --- phpseclib/Crypt/Common/SymmetricKey.php | 6 +++--- phpseclib/Crypt/RSA.php | 2 +- phpseclib/Crypt/Random.php | 4 ++-- phpseclib/File/X509.php | 2 +- phpseclib/Math/BigInteger.php | 2 +- phpseclib/Math/BigInteger/Engines/BCMath.php | 2 +- phpseclib/Math/BigInteger/Engines/BCMath/Base.php | 2 +- phpseclib/Math/BigInteger/Engines/PHP.php | 2 +- phpseclib/Math/BigInteger/Engines/PHP/Base.php | 2 +- .../Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php | 2 +- phpseclib/Math/BigInteger/Engines/PHP32.php | 2 +- phpseclib/Math/BigInteger/Engines/PHP64.php | 2 +- phpseclib/Net/SFTP.php | 2 +- phpseclib/Net/SFTP/Stream.php | 2 +- phpseclib/Net/SSH1.php | 2 +- phpseclib/Net/SSH2.php | 4 ++-- tests/Functional/Net/SFTPUserStoryTest.php | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/phpseclib/Crypt/Common/SymmetricKey.php b/phpseclib/Crypt/Common/SymmetricKey.php index d21fb7ec..75ccaf6c 100644 --- a/phpseclib/Crypt/Common/SymmetricKey.php +++ b/phpseclib/Crypt/Common/SymmetricKey.php @@ -493,7 +493,7 @@ abstract class SymmetricKey public function __construct($mode) { $mode = strtolower($mode); - // necessary because of 5.6 compatability; we can't do isset(self::MODE_MAP[$mode]) in 5.6 + // necessary because of 5.6 compatibility; we can't do isset(self::MODE_MAP[$mode]) in 5.6 $map = self::MODE_MAP; if (!isset($map[$mode])) { throw new \InvalidArgumentException('No valid mode has been specified'); @@ -1504,7 +1504,7 @@ abstract class SymmetricKey * PHP's OpenSSL bindings do not operate in continuous mode so we'll wrap around it. Since the keystream * for CTR is the same for both encrypting and decrypting this function is re-used by both SymmetricKey::encrypt() * and SymmetricKey::decrypt(). Also, OpenSSL doesn't implement CTR for all of it's symmetric ciphers so this - * function will emulate CTR with ECB when necesary. + * function will emulate CTR with ECB when necessary. * * @see self::encrypt() * @see self::decrypt() @@ -2187,7 +2187,7 @@ abstract class SymmetricKey * * This ensures that _setupInlineCrypt() has always a * full ready2go initializated internal cipher $engine state - * where, for example, the keys allready expanded, + * where, for example, the keys already expanded, * keys/block_size calculated and such. * * It is, each time if called, the responsibility of _setupInlineCrypt(): diff --git a/phpseclib/Crypt/RSA.php b/phpseclib/Crypt/RSA.php index 115735ac..72479130 100644 --- a/phpseclib/Crypt/RSA.php +++ b/phpseclib/Crypt/RSA.php @@ -613,7 +613,7 @@ class RSA extends AsymmetricKey /** * Returns a minimalistic private key * - * Returns the private key without the prime number constituants. Structurally identical to a public key that + * Returns the private key without the prime number constituents. Structurally identical to a public key that * hasn't been set as the public key * * @see self::getPrivateKey() diff --git a/phpseclib/Crypt/Random.php b/phpseclib/Crypt/Random.php index f72ff344..8d5b2df1 100644 --- a/phpseclib/Crypt/Random.php +++ b/phpseclib/Crypt/Random.php @@ -73,11 +73,11 @@ abstract class Random // PHP isn't low level to be able to use those as sources and on a web server there's not likely // going to be a ton of keyboard or mouse action. web servers do have one thing that we can use // however, a ton of people visiting the website. obviously you don't want to base your seeding - // soley on parameters a potential attacker sends but (1) not everything in $_SERVER is controlled + // solely on parameters a potential attacker sends but (1) not everything in $_SERVER is controlled // by the user and (2) this isn't just looking at the data sent by the current user - it's based // on the data sent by all users. one user requests the page and a hash of their info is saved. // another user visits the page and the serialization of their data is utilized along with the - // server envirnment stuff and a hash of the previous http request data (which itself utilizes + // server environment stuff and a hash of the previous http request data (which itself utilizes // a hash of the session data before that). certainly an attacker should be assumed to have // full control over his own http requests. he, however, is not going to have control over // everyone's http requests. diff --git a/phpseclib/File/X509.php b/phpseclib/File/X509.php index 5f10f49e..ce140986 100644 --- a/phpseclib/File/X509.php +++ b/phpseclib/File/X509.php @@ -522,7 +522,7 @@ class X509 /* "[For RSA keys] the parameters field MUST have ASN.1 type NULL for this algorithm identifier." -- https://tools.ietf.org/html/rfc3279#section-2.3.1 - given that and the fact that RSA keys appear ot be the only key type for which the parameters field can be blank, + given that and the fact that RSA keys appear to be the only key type for which the parameters field can be blank, it seems like perhaps the ASN.1 description ought not say the parameters field is OPTIONAL, but whatever. */ $cert['tbsCertificate']['subjectPublicKeyInfo']['algorithm']['parameters'] = null; diff --git a/phpseclib/Math/BigInteger.php b/phpseclib/Math/BigInteger.php index 7008b49a..665b117f 100644 --- a/phpseclib/Math/BigInteger.php +++ b/phpseclib/Math/BigInteger.php @@ -500,7 +500,7 @@ class BigInteger implements \Serializable } /** - * Logical Exlusive Or + * Logical Exclusive Or * * @param BigInteger $x * @return BigInteger diff --git a/phpseclib/Math/BigInteger/Engines/BCMath.php b/phpseclib/Math/BigInteger/Engines/BCMath.php index dd34f717..d4f2e824 100644 --- a/phpseclib/Math/BigInteger/Engines/BCMath.php +++ b/phpseclib/Math/BigInteger/Engines/BCMath.php @@ -399,7 +399,7 @@ class BCMath extends Engine } /** - * Logical Exlusive Or + * Logical Exclusive Or * * @param BCMath $x * @return BCMath diff --git a/phpseclib/Math/BigInteger/Engines/BCMath/Base.php b/phpseclib/Math/BigInteger/Engines/BCMath/Base.php index 026cd86f..09c002f0 100644 --- a/phpseclib/Math/BigInteger/Engines/BCMath/Base.php +++ b/phpseclib/Math/BigInteger/Engines/BCMath/Base.php @@ -77,7 +77,7 @@ abstract class Base extends BCMath } /** - * Modular reduction preperation + * Modular reduction preparation * * @param string $x * @param string $n diff --git a/phpseclib/Math/BigInteger/Engines/PHP.php b/phpseclib/Math/BigInteger/Engines/PHP.php index 1ec77e24..ff5b3827 100644 --- a/phpseclib/Math/BigInteger/Engines/PHP.php +++ b/phpseclib/Math/BigInteger/Engines/PHP.php @@ -929,7 +929,7 @@ abstract class PHP extends Engine } /** - * Logical Exlusive Or + * Logical Exclusive Or * * @param PHP $x * @return PHP diff --git a/phpseclib/Math/BigInteger/Engines/PHP/Base.php b/phpseclib/Math/BigInteger/Engines/PHP/Base.php index 640d17c6..6549592d 100644 --- a/phpseclib/Math/BigInteger/Engines/PHP/Base.php +++ b/phpseclib/Math/BigInteger/Engines/PHP/Base.php @@ -104,7 +104,7 @@ abstract class Base extends PHP } /** - * Modular reduction preperation + * Modular reduction preparation * * @param array $x * @param array $n diff --git a/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php b/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php index bc8657ed..ec130b69 100644 --- a/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php +++ b/phpseclib/Math/BigInteger/Engines/PHP/Reductions/EvalBarrett.php @@ -419,7 +419,7 @@ abstract class EvalBarrett extends Base /** * Inline Comparison * - * If $uknown >= $known then loop + * If $unknown >= $known then loop * * @param array $known * @param string $unknown diff --git a/phpseclib/Math/BigInteger/Engines/PHP32.php b/phpseclib/Math/BigInteger/Engines/PHP32.php index 8fa7414b..bf071e7b 100644 --- a/phpseclib/Math/BigInteger/Engines/PHP32.php +++ b/phpseclib/Math/BigInteger/Engines/PHP32.php @@ -218,7 +218,7 @@ class PHP32 extends PHP } /** - * Logical Exlusive Or + * Logical Exclusive Or * * @param PHP32 $x * @return PHP32 diff --git a/phpseclib/Math/BigInteger/Engines/PHP64.php b/phpseclib/Math/BigInteger/Engines/PHP64.php index ae2bea99..5ebcc599 100644 --- a/phpseclib/Math/BigInteger/Engines/PHP64.php +++ b/phpseclib/Math/BigInteger/Engines/PHP64.php @@ -218,7 +218,7 @@ class PHP64 extends PHP } /** - * Logical Exlusive Or + * Logical Exclusive Or * * @param PHP64 $x * @return PHP64 diff --git a/phpseclib/Net/SFTP.php b/phpseclib/Net/SFTP.php index 3f29e827..270173e5 100644 --- a/phpseclib/Net/SFTP.php +++ b/phpseclib/Net/SFTP.php @@ -374,7 +374,7 @@ class SFTP extends SSH2 3 => 'NET_SFTP_TYPE_SYMLINK', 4 => 'NET_SFTP_TYPE_SPECIAL', 5 => 'NET_SFTP_TYPE_UNKNOWN', - // the followin types were first defined for use in SFTPv5+ + // the following types were first defined for use in SFTPv5+ // http://tools.ietf.org/html/draft-ietf-secsh-filexfer-05#section-5.2 6 => 'NET_SFTP_TYPE_SOCKET', 7 => 'NET_SFTP_TYPE_CHAR_DEVICE', diff --git a/phpseclib/Net/SFTP/Stream.php b/phpseclib/Net/SFTP/Stream.php index 8cf094db..30a94dd3 100644 --- a/phpseclib/Net/SFTP/Stream.php +++ b/phpseclib/Net/SFTP/Stream.php @@ -98,7 +98,7 @@ class Stream /** * Context resource * - * Technically this needs to be publically accessible so PHP can set it directly + * Technically this needs to be publicly accessible so PHP can set it directly * * @var resource * @access public diff --git a/phpseclib/Net/SSH1.php b/phpseclib/Net/SSH1.php index 0dce1262..e3c9071f 100644 --- a/phpseclib/Net/SSH1.php +++ b/phpseclib/Net/SSH1.php @@ -1336,7 +1336,7 @@ class SSH1 // to be encrypted in the least significant bytes, the last byte of the // data in the least significant byte. - // Presumably the part of PKCS#1 they're refering to is "Section 7.2.1 Encryption Operation", + // Presumably the part of PKCS#1 they're referring to is "Section 7.2.1 Encryption Operation", // under "7.2 RSAES-PKCS1-v1.5" and "7 Encryption schemes" of the following URL: // ftp://ftp.rsasecurity.com/pub/pkcs/pkcs-1/pkcs-1v2-1.pdf $modulus = $key[1]->toBytes(); diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index 820ef15a..70878752 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -93,8 +93,8 @@ class SSH2 * RFC4254 refers not to client and server channels but rather to sender and recipient channels. we don't refer * to them in that way because RFC4254 toggles the meaning. the client sends a SSH_MSG_CHANNEL_OPEN message with * a sender channel and the server sends a SSH_MSG_CHANNEL_OPEN_CONFIRMATION in response, with a sender and a - * recepient channel. at first glance, you might conclude that SSH_MSG_CHANNEL_OPEN_CONFIRMATION's sender channel - * would be the same thing as SSH_MSG_CHANNEL_OPEN's sender channel, but it's not, per this snipet: + * recipient channel. at first glance, you might conclude that SSH_MSG_CHANNEL_OPEN_CONFIRMATION's sender channel + * would be the same thing as SSH_MSG_CHANNEL_OPEN's sender channel, but it's not, per this snippet: * The 'recipient channel' is the channel number given in the original * open request, and 'sender channel' is the channel number allocated by * the other side. diff --git a/tests/Functional/Net/SFTPUserStoryTest.php b/tests/Functional/Net/SFTPUserStoryTest.php index 09503539..e487afc1 100644 --- a/tests/Functional/Net/SFTPUserStoryTest.php +++ b/tests/Functional/Net/SFTPUserStoryTest.php @@ -608,7 +608,7 @@ class Functional_Net_SFTPUserStoryTest extends PhpseclibFunctionalTestCase $this->assertInternalType( 'array', $sftp->stat(self::$scratchDir), - 'Failed asserting that stat on an existant empty directory returns an array' + 'Failed asserting that stat on an existent empty directory returns an array' ); $this->assertTrue( $sftp->delete(self::$scratchDir),