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
cee0f3343b
CS: Fix "PEAR.Formatting.MultiLineAssignment.EqualSignLine" sniff.
2013-12-07 20:47:30 +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
Hans-Jürgen Petrich
89ea2da86b
Crypt_*: CS and comments
...
- Crypt_* Some CS
- Crypt_Base: better comments for phpseclib developers
- Crypt_Base::_createInlineCryptFunction(): better namespace for
internal variables (all now prefixed with an underscore to avoid
conflicts)
2013-06-26 11:50:40 +07: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
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
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
995c09cb67
CS and method namings
2013-05-25 09:05:24 +07:00
Hans-Jürgen Petrich
72fa880aa2
BL/TF optimizations. 3DES: +20% speed
...
- Blowfish/Twofish small optimizations
- 3DES +20% speedup from Patrick's commit:
f596c577cf
2013-05-23 01:11:08 +07:00
Patrick Monnerat
f596c577cf
DES: move IP/inverse IP transforms out of the round loop in inline_crypt_setup().
...
This is another 20% runtime gain on triple DES.
2013-05-21 16:01:10 +02:00
Hans-Jürgen Petrich
55ff00cc35
Crypt_Base
...
Crypt_Base() implementation
2013-05-20 13:19:38 +07:00
Hans-Jürgen Petrich
6b7c1da103
DES: removed debug code
...
removed debug code
2013-04-30 14:53:27 +07:00
Hans-Jürgen Petrich
c4752cbeba
DES / 3DES Performance Update
...
DES / 3DES Performance Update.
Inline en/decrypting gives additional ~25% performance.
100% compatible with the current DES/TribleDES.php
Strong testet on Windows/Linux 32/64bit with php4/5.0/5.1//5.2/5.3/5.4
2013-04-25 14:16:10 +07:00
Patrick Monnerat
a13684584c
DES: fix file permissions.
2013-04-24 11:02:01 +02:00
Patrick Monnerat
a8e5ccf895
DES: pre-permuted tables version.
2013-04-24 11:00:11 +02:00
Hans-Jürgen Petrich
ee84c4b41d
$plaintext should be $ciphertext
2013-03-06 18:14:27 +07:00
terrafrost
5f64ab67ab
DES: $block wasn't defined
2013-03-04 08:25:40 -06:00
terrafrost
15817a416e
DES: Fix memory leak in OFB mode
2013-03-03 11:30:03 -06:00
terrafrost
bf3ca6312e
DES: Fix memory leak with CTR mode
2013-03-03 00:31:48 -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
Hans-Jürgen Petrich
bfab4c47f9
DES: Fixed CFB decrypt() using MODE_MCRYPT and ContinuousBuffer
...
DES: Fixed small bug from commit d94f1b252d
(DES.php in line 739-740)
in CFB decrypt() using CRYPT_DES_MODE_MCRYPT and enableContinuousBuffer()
2013-01-21 10:15:13 +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
Hans-Jürgen Petrich
c624c785ee
DES: Fixed CFB/OFB and continuousBuffer
...
FIXED: multiple calls to enable/disableCMode() will work now
FIXED: CFB/OFB modes
FIXED: "Illegal string offset" and strlen(array()) Warning/Notice
2013-01-13 01:48:48 +07:00
terrafrost
e71fc97913
Revamp SSH1 logging and go back to using user_error
...
(_handle_error returned the line number in _handle_error - not the line number triggering the error)
2013-01-08 22:09:27 -06:00
terrafrost
c1244dd339
CFB didn't always work in continuous mode
2013-01-04 20:53:23 -06:00
terrafrost
61ad80fd64
More strlen() / empty() changes
2013-01-03 00:26:27 -06:00
terrafrost
9b4240c104
Use !empty('0') instead of strlen('0')
...
Thanks petrich!
2013-01-03 00:21:09 -06:00
terrafrost
3caaa91160
Replace user_error() with new _handle_error() function
...
To use exceptions do define('PHPSECLIB_USE_EXCEPTIONS', true).
To have the exceptions thrown by phpseclib be of a certain class define PHPSECLIB_EXCEPTION_CLASS.
2012-11-28 23:33:15 -06:00
terrafrost
2a1909fd71
Set $this->paddable to true in a few missing places
2012-11-16 02:59:06 -06:00
terrafrost
3a5ab5276e
CRYPT_MODE_DES_CBC should have been CRYPT_DES_MODE_CBC
...
Thanks arook!
2012-09-22 11:32:41 -05:00
terrafrost
dfe264594f
Merge pull request #9 from bantu/feature/consistent-file-endings
...
[feature/consistent-file-endings] Remove ?> and make sure there is an empty line at the end of files.
2012-06-16 21:06:15 -07:00
terrafrost
ccd2b6ae78
- PBKDF2 updates
2012-06-16 16:42:54 -05:00
Andreas Fischer
eb64dfef7d
[feature/consistent-file-endings] Make sure files have empty line at the end.
2012-06-11 10:34:07 +02: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
a00a5e6ba4
- add pbkdf2 support via setPassword()
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@185 21d32557-59b3-4da0-833f-c5933fad653e
2011-11-13 02:23:56 +00:00
Jim Wigginton
d7c43d03a2
- fix bug with pure-PHP CTR mode (thanks, Max!)
...
git-svn-id: http://phpseclib.svn.sourceforge.net/svnroot/phpseclib/trunk@177 21d32557-59b3-4da0-833f-c5933fad653e
2011-09-04 16:23:50 +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