Download the PHP package phpseclib/phpseclib2_compat without Composer
On this page you can find all versions of the php package phpseclib/phpseclib2_compat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download phpseclib/phpseclib2_compat
More information about phpseclib/phpseclib2_compat
Files in phpseclib/phpseclib2_compat
Package phpseclib2_compat
Short Description phpseclib 2.0 polyfill built with phpseclib 3.0
License MIT
Homepage https://github.com/phpseclib/phpseclib2_compat
Informations about the package phpseclib2_compat
phpseclib2_compat
phpseclib 2.0 polyfill built with phpseclib 3.0
Overview
phpseclib 3.0 breaks backwards compatability with phpseclib 2.0. Most notably, public keys work completely differently. So let's say you wanted to use phpseclib 3.0 whilst some of your other dependencies still use phpseclib 2.0. What would you do in that instance?
That's where phpseclib2_compat comes into play. Require phpseclib/phpseclib:~3.0 and phpseclib/phpseclib2_compat:~1.0 and your dependencies will magically start using phpseclib 3.0 even if they don't know it.
Using phpseclib2_compat will actually bring a few enhancements to your dependencies. For example, while phpseclib 2.0 only supports RSA keys phpseclib2_compat sports support for ECDSA / DSA / Ed25519 / Ed449 keys.
Consider this code sample:
That'll work with phpseclib2_compat, even with an ECDSA private key, whereas in phpseclib 2.0 it would not work.
SSH1 and SCP are not supported but those were likely never frequently used anyway.
Using the old cipher suite
phpseclib 3.0 uses a different cipher suite (an expanded one) than 2.0. If this causes you issues you can use the 2.0 ciphersuite by doing this prior to calling $ssh->login()
:
Installation
With Composer: