Andreas Fischer
6ba2b374e5
Merge branch 'master' into php5
...
* 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
2014-08-15 16:27:36 +02:00
terrafrost
aa0e7347ef
AES: a few final changes
2014-08-14 23:09:17 -05:00
terrafrost
35fd2888ea
Rijndael, AES: adjustments to what key sizes are and aren't allowed
2014-08-13 09:56:49 -05:00
Andreas Fischer
67aedc240b
Change constructors from class name to __construct().
...
This has been produced as follows:
<?php
$replace = $files = [];
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($argv[1]));
foreach ($it as $fileinfo) {
if ($fileinfo->getExtension() === 'php') {
$file = $fileinfo->getPathname();
$content = file_get_contents($file);
$files[$file] = $content;
$tokens = token_get_all($content);
foreach ($tokens as $key => $value) {
if ($value[0] === T_CLASS) {
$class = $tokens[$key + 2][1];
$replace += array(
"$class::$class(" => "$class::__construct(",
"parent::$class(" => "parent::__construct(",
"function $class(" => "function __construct(",
);
}
}
}
}
foreach ($files as $file => $content) {
file_put_contents(
$file,
str_replace(
array_keys($replace),
array_values($replace),
$content
)
);
}
2014-06-16 17:06:34 +02:00
Andreas Fischer
d38886c2a9
Always correctly link to the constructor of Crypt_Base.
2014-06-16 16:42:18 +02:00
Andreas Fischer
91e78c2106
Remove unnecessary constructors.
2014-06-16 16:14:35 +02:00
Andreas Fischer
e6f87318f5
Adjust documentation to coding guidelines: No () around include.
2014-06-01 23:28:49 +02:00
Andreas Fischer
fb1296bbec
Drop meaningless, outdated, inconsistent version tags in doc blocks.
...
find phpseclib -type f -name "*.php" -exec sed -i '/@version/d' {} \;
2014-03-11 15:58:33 +01:00
Veres Lajos
930a3fb4d2
typofixes - https://github.com/vlajos/misspell_fixer
2014-03-05 23:41:20 +00:00
Andreas Fischer
56f1ada5c1
CS: Each file MUST end with exactly one newline character
2014-02-10 14:51:35 +01:00
Andreas Fischer
f0f029b2c1
CS: Fix "PEAR.Commenting.ClassComment.WrongTagOrder" sniff.
2013-12-11 18:33:18 +01:00
Andreas Fischer
3db1fbb072
CS: Fix "PEAR.Commenting.FileComment.TagIndent" sniff.
2013-12-10 20:10:37 +01:00
Andreas Fischer
6d1fb9f7db
CS: Fix "PEAR.Files.IncludingFile.UseIncludeOnce" sniff.
2013-12-06 01:03:34 +01:00
Andreas Fischer
bc6ff96292
Fix "PEAR.Files.IncludingFile.BracketsNotRequired" sniff.
2013-12-05 23:17:40 +01:00
Andreas Fischer
e09f1b730e
CodeSniffer: Fix PEAR.Classes.ClassDeclaration.OpenBraceNewLine sniff.
2013-12-03 19:34:41 +01:00
Marc Philip Scholten
3bfd884813
Removed vim comments
...
Reformated files
2013-11-23 19:42:26 +01:00
terrafrost
7b3434c01f
Merge remote-tracking branch 'origin/master' into Crypt_Base
...
Conflicts:
phpseclib/Crypt/DES.php
phpseclib/Crypt/RC4.php
2013-06-11 14:59:13 -05:00
terrafrost
17d73a4e35
AES: use ()'s for require_once
...
All other require_once's use them so for consistency this one ought to too
2013-06-10 16:39:49 -05:00
Andreas Fischer
727dba5905
[remove-svn-version-lines] Remove useless @version: $Id$ lines.
...
These lines served some purpose on SVN, but are now useless on Git. They
actually do harm as they might make people think their files are older
than they actually are.
2013-06-02 18:50:46 +02:00
Hans-Jürgen Petrich
fb8d185804
Base/AES/Rijndael: Optimizations
...
- Base/Rijndael/AES: Comments updated.
- Base: removed __desctructor(). Re:
https://github.com/phpseclib/phpseclib/issues/107
- Base: setPassword() will use >= php-5.5's new (faster) hash_pbkdf2()
function if availalbe/possible. 100% compatible to the internal
implementation. Strong testet with all
hashes/iterations/lengths/ciphers.
- Rijndael: Runtime engine-switch: Will now use mcrypt (in case of
128/192/256-bit block/keys), if possible. Otherwise MODE_INTERNAL.
AES: Soucecode reducing. After all, now, AES.php is virtually nothing
other than a wrapper to Rijndael.php::new
Crypt_Rijndael()->setBlockLength(128). No different in speed or
functionality, but fixed block_size.
2013-06-02 16:21:32 +07:00
Hans-Jürgen Petrich
53276ba4a1
AES: inconsistencey with 160 / 224-bits keys
...
re: https://github.com/phpseclib/phpseclib/issues/110
2013-06-01 08:00:04 +07:00
Hans-Jürgen Petrich
35f1b8dc2b
Method namings
2013-05-25 14:08:17 +07:00
Hans-Jürgen Petrich
5429504aee
CS adjustment
2013-05-25 11:22:25 +07:00
Hans-Jürgen Petrich
55ff00cc35
Crypt_Base
...
Crypt_Base() implementation
2013-05-20 13:19:38 +07:00
Hans-Jürgen Petrich
afa5465e63
AES/Rijndael Performance Update [3]
...
Performance Update for AES/Rijndael
2013-02-25 12:19:51 +07:00
Hans-Jürgen Petrich
93f9922410
Small CS fix [2]
2013-02-07 00:45:03 +07:00
Hans-Jürgen Petrich
323396df3c
Small CS fix
2013-02-03 23:19:09 +07:00
Hans-Jürgen Petrich
b4bbb27ef6
AES: Performance update
...
Performance update for AES
2013-01-31 00:59:53 +07:00
terrafrost
13eb688c90
AES, RC4: CS adjustments
2013-01-30 08:39:02 -06:00
terrafrost
248e3bb085
Undo last commit
2013-01-30 08:37:50 -06:00
terrafrost
bfb04dcf4d
Add __construct() constructor to make namespace'ing easier for those wishing to do it
2013-01-29 22:09:31 -06:00
terrafrost
6765cb3b2b
Rijndael, AES: CS adjustments
2013-01-27 01:21:28 -06:00
Hans-Jürgen Petrich
7dceef6ef4
AES: Performance update
...
Performance update for AES
Related to: https://github.com/phpseclib/phpseclib/pull/65
2013-01-26 16:58:31 +07:00
Hans-Jürgen Petrich
2deea8b491
AES: Fixed CFB decrypt() using MODE_MCRYPT and ContinuousBuffer
...
AES: Fixed small bug from commit d94f1b252d
(AES.php in line 425-426)
in CFB decrypt() using CRYPT_AES_MODE_MCRYPT and enableContinuousBuffer()
2013-01-21 10:08:49 +07:00
terrafrost
d94f1b252d
AES, DES, RC4, Rijndael, TripleDES: multiple changes
...
- apply petrich's TripleDES / CFB decrypt to AES and DES
- make DES use the updated _generate_xor
- correct a comment typo
2013-01-20 10:11:19 -06:00
terrafrost
7c0926d94a
Merge remote-tracking branch 'origin/petrich'
...
Conflicts:
phpseclib/Crypt/AES.php
2013-01-11 18:06:43 -06:00
terrafrost
74e61deb4f
AES: CFB: decrypted strings were being truncated
2013-01-11 15:30:06 -06:00
terrafrost
4a1cbfa7fd
Merge remote-tracking branch 'petrich/patch-3' into petrich
...
Conflicts:
phpseclib/Crypt/AES.php
2013-01-10 23:49:59 -06:00
terrafrost
bbd62f6490
AES: CFB mode fix
2013-01-10 20:42:38 -06:00
Hans-Jürgen Petrich
20461866ef
AES: Fix broken CFB and disableContinuousBuffer()
...
Related to: https://github.com/phpseclib/phpseclib/pull/45
2013-01-10 23:27:12 +07:00
terrafrost
d741def23c
AES: Fix broken CFB and disableContinuousBuffer()
...
Quoting from petrich's pull request (from which this commit was inspired):
Fixed: Broken CFB in continuous mode when using CRYPT_AES_MODE_MCRYPT (related to: #39 )
Fixed: Multiple calls to enable/disableContinuousBuffer()
Fixed: Some PHP Notice/Warnings about strlen(array())
2013-01-09 17:39:57 -06:00
terrafrost
edc6d9cf5b
AES.php in mcrypt mode always treated CFB as though it was a continuous cipher
2013-01-06 19:09:43 -06:00
Rob Loach
7e9a975296
Add Composer support to phpseclib
2012-06-08 15:38:27 -04:00
Jim Wigginton
b39d2597dd
- if the algorithm is not supported upon mcrypt's initial initialization use the internal implementation
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@220 21d32557-59b3-4da0-833f-c5933fad653e
2012-05-14 01:21:21 +00:00
Jim Wigginton
b1c7fed946
- the IV wasn't resetting when mcrypt was being used
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@186 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-16 06:53:36 +00:00
Jim Wigginton
392d96445e
- add support for PuTTY and XML formatted RSA keys
...
- remove ?>'s from PHP_Compat files
- update LICENSE block
- make it so NET_SSH2_MSG_USERAUTH_PK_OK records direction and time
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@152 21d32557-59b3-4da0-833f-c5933fad653e
2011-04-18 12:17:40 +00:00
Jim Wigginton
354a0965e8
- AES should try to auto-predict the size of keys when the size isn't specified; last update interfered with that
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@137 21d32557-59b3-4da0-833f-c5933fad653e
2010-12-02 03:38:22 +00:00
Jim Wigginton
b94a467999
- change license to the less restrictive MIT license (if people want to modify phpseclib and distribute binaries of it [whatever that means for PHP] without including the source code I don't care); two of the three PHP_Compat stuff still uses the LGPL since I didn't author them but they're only needed, anyway, if you're using phpseclib on PHP4.
...
- add svn:eol-style: LF to all files
- fixed pear.php.net bug # 18037 (thanks, nounours!)
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@130 21d32557-59b3-4da0-833f-c5933fad653e
2010-11-13 19:28:20 +00:00
Jim Wigginton
a15cf62d3a
- change $ecb to $this->ecb
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@124 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-26 05:24:52 +00:00
Jim Wigginton
76655b8bf9
- CFB mode is now supported as a stream cipher
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@122 21d32557-59b3-4da0-833f-c5933fad653e
2010-09-26 03:10:20 +00:00