[master] More work on Hash.php
* bantu/hash-rewrite:
Hash: Cover remaining uncovered line.
Hash: Update incorrect documentation, use max line length 80.
Hash: Remove constructor return value documentation.
Hash: Do not assign false to length property. It's documented as an int.
Hash: Rename properly l to length.
Slightly rework of HashTest.php.
* 1.0:
Fixed another case
Minor tweaks
Fixed error
More fixes
PHPDoc fixes
Conflicts:
phpseclib/Crypt/Random.php
phpseclib/Math/BigInteger.php
phpseclib/Net/SSH2.php
tests/Functional/Net/SFTPUserStoryTest.php
* 2.0:
Remove unnecessary parens
Convert most instances of function_exists() to extension_loaded() where applicable
Remove conditions for PHP < 5.3.0 for this branch
Switch to extension_loaded('gmp')
Switch to extension_loaded instead of function_exists where it makes sense
Switch to extension loaded (2.0)
* cweagans/switch-to-extension-loaded-2.0:
Remove conditions for PHP < 5.3.0 for this branch
Switch to extension_loaded('gmp')
Switch to extension_loaded instead of function_exists where it makes sense
Switch to extension loaded (1.0)
* cweagans/switch-to-extension-loaded-1.0:
Remove unnecessary parens
Convert most instances of function_exists() to extension_loaded() where applicable
Tests/X509: add unit test showing need for return by reference
* terrafrost/x509_unit_test:
Tests/X509: add unit test showing need for return by reference
This was previously required to load MATH_BIGINTEGER_MODE_* constants, but
these are autoloadable via \phpseclib\Math\BigInteger::MODE_* now and the
include path was removed.
* PSR2-1.0:
Fix indentation phpcbf did not fix.
Remove PSR2.Methods.FunctionCallSignature.SpaceAfterOpenBracket exception.
Use phpcbf to fix PHP code to ruleset.
Ignore coding guidelines in ANSI switch block.
Base code sniffer ruleset on PSR2 rather than PEAR.
Update PHP Code Sniffer to 2.3.3
Conflicts:
build/code-sniffer-ruleset-tests.xml
build/code-sniffer-ruleset.xml
composer.lock
phpseclib/Crypt/DES.php
phpseclib/Crypt/Hash.php
phpseclib/Crypt/RSA.php
phpseclib/File/X509.php
phpseclib/Math/BigInteger.php
phpseclib/Net/SFTP.php
phpseclib/Net/SSH1.php
phpseclib/Net/SSH2.php
tests/Functional/Net/SFTPUserStoryTest.php
tests/Unit/Crypt/TwofishTest.php
ASN1 parsing fix for issue mainly effecting CSR's for 2.0 branch
* terrafrost/asn1-fix-2.0:
Tests/X509: PHP5 adjustments
ASN1: handle malformed input better
Tests/X509/CSR: add unit test for ASN1 changes
ASN1: constructed context-specific tags can have x sub elements
ASN1 parsing fix for issue mainly effecting CSR's for 1.0 branch
* terrafrost/asn1-fix-1.0:
ASN1: handle malformed input better
Tests/X509/CSR: add unit test for ASN1 changes
ASN1: constructed context-specific tags can have x sub elements
* 1.0:
Tests/X509: swap expected and actual value
Tests/X509: fix unit test
Tests/X509: add unit test for unsupported extension encoding
X509: always base64-encode extensions for which _getMapping returns a bool
When padding is enabled $des->decrypt() will return false with ciphertext's
of invalid length. Which makes sense. Null padding doesn't work when padding
is enabled because 0 isn't a valid PKCS7 padding character (has to be between
1 and the block_length, inclusive).
Change copyright years from roman numeral to decimal numbers.
* bantu/fix-547:
Change copyright years from roman numeral to decimal numbers.
Conflicts:
phpseclib/System/SSH_Agent.php
aside from the addition of OpenSSL support a few other changes have been included:
- setEngine(), as added by petrich, is depricated (not that it was ever in trunk to begin with)
it has been replaced with isValidEngine() and setPreferredEngine().
- replace _generate_xor() with increment_str()
_increment_str() had extra functionality that wasn't being used. ie. it could concatenate
multiple successive string increments to one another automatically. but not only was that
functionality not used - it also made the function less versatile. _increment_str() can be
used more easily for iterative brute forcing (for example)
- rename Crypt_Base::_stringShift to Crypt_Base::_string_shift (for consistency)
- more expansive unit test coverage
* master:
ASN1: fix unit test
ASN1: add unit test for non-constructed context-specific change
ASN1: fix issue with non-constructed context-specific tags
README: update download link to 0.3.8
* master:
RSA: syntax error in unit tests
RSA: make unit tests perform string comparisons sans white space chars
RSA: update unit test
RSA: add unit test
RSA: make XML keys use unsigned integers
* master:
ASN1Test: Even better, use assertCount instead of assertSame.
ASN1Test: The expected value comes first in assertEquals/assertSame.
ASN1Test: Also check the type by using assertSame instead of assertEquals.
* master:
ASN1: one more unit test change
ASN1: another unit test update
ASN1: unit test adjustments
ASN1: cs adjustments to unit test
ASN1: add unit tests for indefinite length decoding
ASN1: CS adjustment (rm whitespace at eol)
ASN1: rewrite _decode_der
Conflicts:
phpseclib/File/ASN1.php
* master:
AES: don't do mcrypt unit tests if mcrypt extension is not available
AES: a few final changes
AES: set CRYPT_RIJNDAEL_MODE as well in unit tests
AES: CS changes to unit tests
AES: more unit test fixes
AES: unit test updates
AES: more unit test fixes
AES: add new lines to end of unit tests
AES: CS adjustments to unit tests
AES: first attempt at unit tests for key padding
Rijndael, AES: adjustments to what key sizes are and aren't allowed
* master:
Hash: apply fixes to sha512 unit tests as well
Hash: one more fix to unit test
Hash: fix unit tests
Hash: add unit tests
Hash: add sha256-96 and sha512-96
* master:
Use get_called_class() if available.
Add Net_SFTP_Stream::register() for easier autoloading.
Add unit test for (to be added) Net_SFTP_Stream::register().
* master:
Crypt/Base: readability improvement
RSA: CS adjustments
RSA: rename PUBLIC_FORMAT_PKCS1_RAW -> PUBLIC_FORMAT_PKCS8
RSA: add PKCS8 unit tests
RSA: add support for saving encrypted PKCS8 keys
Crypt/Base: adjust default key size for pbkdf1
RSA: add support for loading PKCS8 encrypted private keys
Crypt/Base: add support for pbkdf1
RSA: add support for saving to PKCS8 (unencrypted)
RSA: add support for PKCS8 encoded private keys
* terrafrost/pkcs8:
Crypt/Base: readability improvement
RSA: CS adjustments
RSA: rename PUBLIC_FORMAT_PKCS1_RAW -> PUBLIC_FORMAT_PKCS8
RSA: add PKCS8 unit tests
RSA: add support for saving encrypted PKCS8 keys
Crypt/Base: adjust default key size for pbkdf1
RSA: add support for loading PKCS8 encrypted private keys
Crypt/Base: add support for pbkdf1
RSA: add support for saving to PKCS8 (unencrypted)
* master:
BigInteger: one more change to the comments
BigInteger: update comments
BigInteger: unit test update
BigInteger: change argument names for random / randomPrime
BigInteger: fix unit tests
BigInteger: fix syntax error
BigInteger: make it so you can do $min->random($max)
Conflicts:
phpseclib/Math/BigInteger.php
* master:
X509: Unit test CS changes
X509: move location of SPKAC unit test
X509: CS adjustments
X509: PHP4 compat changes
RSA: PHP4 compat changes
X509: rm trailing white space from unit test
X509: add SPKAC unit test
X509: add signSPKAC() and saveSPKAC() methods