Commit Graph

5 Commits

Author SHA1 Message Date
terrafrost
4171262b9e SymmetricKey: use strings for constructor and setPreferredEngine 2017-06-28 06:54:10 -05:00
terrafrost
c509909004 Organizational Revamp
- rename \phpseclib\Crypt\Base to \phpseclib\Crypt\Common\SymmetricKey
- create BlockCipher and StreamCipher to extend SymmetricKey
- replace _string_shift with \phpseclib\Common\Functions\Strings::shift
2016-07-30 22:18:06 -05:00
terrafrost
ebcb3130b7 Merge branch 'openssl-support' into 2.0
Conflicts:
	phpseclib/Crypt/AES.php
	phpseclib/Crypt/Base.php
	phpseclib/Crypt/Blowfish.php
	phpseclib/Crypt/DES.php
	phpseclib/Crypt/RC2.php
	phpseclib/Crypt/RC4.php
	phpseclib/Crypt/Rijndael.php
	phpseclib/Crypt/TripleDES.php
	phpseclib/Crypt/Twofish.php
	phpseclib/Net/SSH2.php
	tests/Functional/Net/SFTPLargeFileTest.php
	tests/Unit/Crypt/AES/InternalTest.php
	tests/Unit/Crypt/AES/McryptTest.php
	tests/Unit/Crypt/AES/TestCase.php
2015-04-02 05:32:31 -05:00
terrafrost
8d40eb22ef Tests: update unit tests to use CRYPT_ENGINE_* instead of CRYPT_MODE_* 2014-12-13 14:34:48 -06:00
terrafrost
f6e0c4b506 Crypt: add OpenSSL support
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
2014-11-29 07:39:21 -06:00