Commit Graph

383 Commits

Author SHA1 Message Date
terrafrost
a19b5b4ca8 update how @internal phpdoc attributes are used 2020-12-30 05:05:54 -06:00
William Desportes
5711e7fbe4
Fix phpdoc issues reported by Doctum 2020-09-12 10:14:54 +02:00
William Desportes
480af6b980
Merge branch '2.0' into 3.0 2020-09-09 10:46:22 +02:00
William Desportes
05f6467b1d
Merge branch '1.0' into 2.0 2020-09-09 09:56:23 +02:00
William Desportes
2ae683479a
Fix phpdoc errors 2020-09-09 09:43:26 +02:00
terrafrost
653dbd7f94 rename phpseclib/phpseclib to phpseclib/phpseclib3 for 3.0 branch 2019-11-21 19:38:03 -06:00
terrafrost
677a15c122 Merge branch '2.0' 2019-09-15 17:31:53 -05:00
terrafrost
bd6dbd0695 Merge branch '1.0' into 2.0 2019-09-15 17:20:11 -05:00
terrafrost
11fea7d004 fix bug with toBytes() with fixed precision negative numbers 2019-09-15 17:19:35 -05:00
terrafrost
0c6ae076bb Merge branch '1.0' into 2.0 2019-08-03 09:07:59 -05:00
terrafrost
6ae67ef790 BigInteger: fix PHP 7.4 deprecations 2019-08-03 08:58:51 -05:00
terrafrost
7012e72488 mv Keys/ and Signature/ to Formats/* 2019-06-25 07:52:45 -05:00
terrafrost
640e3788f4 Merge branch '2.0' 2019-06-23 11:33:59 -05:00
terrafrost
d6819a55b0 Merge branch '1.0' into 2.0 2019-06-23 11:33:11 -05:00
terrafrost
9e27b4305e BigInteger: !count -> count 2019-06-23 11:32:46 -05:00
terrafrost
33ed294b76 Merge branch '2.0' 2019-06-23 11:14:17 -05:00
terrafrost
bad47d9b00 Merge branch '1.0' into 2.0 2019-06-23 11:13:09 -05:00
terrafrost
4af1bb4c17 BigInteger: the !== [] check only works on PHP 5.4+ 2019-06-23 11:12:17 -05:00
Remi Collet
25469cb98f fix compat with 5.3 2019-06-21 09:25:24 +02:00
terrafrost
84b852933e Merge branch '2.0' 2019-06-19 22:36:18 -05:00
terrafrost
d2085db7b7 Merge branch '1.0' into 2.0 2019-06-19 22:34:11 -05:00
terrafrost
5e9d05a9f4 BigInteger: fix issues with divide method 2019-06-19 22:29:31 -05:00
terrafrost
337b41f865 Merge branch 'master' into immutable-keys 2019-05-26 22:51:40 -05:00
terrafrost
3ca5b88d58 Merge branch '1.0' into 2.0 2019-05-26 15:38:34 -05:00
terrafrost
677ae387b0 BigInteger: backport GMP fixes from master branch 2019-05-26 15:38:18 -05:00
terrafrost
10f79a86af BigInteger: fix for BigInteger('-0') 2019-05-26 15:35:28 -05:00
terrafrost
fae6542efc Merge branch '1.0' into 2.0 2019-05-26 12:17:27 -05:00
terrafrost
8b76e96b83 BigInteger: GMP engine didn't always return 1 or -1 2019-05-26 12:14:44 -05:00
terrafrost
77ffe153a0 Merge branch '1.0' into 2.0 2019-05-26 11:42:01 -05:00
terrafrost
9c67616f1e BigInteger: new BigInteger('00') caused issues with GMP 2019-05-26 11:41:42 -05:00
terrafrost
64542e699f BigInteger: GMP engine didn't always return 1 or -1 2019-05-24 21:45:59 -05:00
terrafrost
cc32cd2e95 make RSA / DSA / ECDSA immutable and add support to SSH2 / X509 2019-05-19 15:35:29 -05:00
terrafrost
75f51fc8cc BigInteger: make the bitwise methods better handle negative numbers 2019-04-10 06:53:00 -05:00
terrafrost
31c10f39e5 BigInteger/GMP: negative base-256 numbers didn't load correctly 2019-04-09 20:42:18 -05:00
terrafrost
114dc17f5b BigInteger: toBits(true) wasn't working correctly 2019-04-08 08:02:48 -05:00
terrafrost
44a56b8a1f BinaryField: fix issue with negate 2019-01-07 08:06:10 -06:00
terrafrost
c53ca28b25 BinaryField: CS adjustment 2019-01-07 06:42:00 -06:00
terrafrost
de63198197 PrimeField: docblock cleanup 2019-01-07 06:34:00 -06:00
terrafrost
4ae33f9bde BinaryField: speed up multiplication for GCM and smaller curves 2019-01-07 06:33:11 -06:00
terrafrost
01c92a59f8 add support for Galois/Counter Mode (GCM) 2018-12-27 08:31:35 -06:00
terrafrost
479fa4ce3d BigInteger: add getEngine() static method 2018-12-02 10:58:07 -06:00
terrafrost
b4ef9a1cae BigInteger: random() would error out if a BigInteger wasn't defined 2018-12-02 10:41:24 -06:00
terrafrost
0398f7a815 add ECDSA / EdDSA support 2018-11-19 12:39:21 -06:00
terrafrost
016b252bbb Merge branch '2.0' 2018-10-08 07:36:04 -05:00
terrafrost
3e41dc7c07 Merge branch '1.0' into 2.0 2018-10-08 07:35:56 -05:00
terrafrost
f2d92cd4b2 BigInteger: rm pear.php.net link 2018-10-08 07:35:36 -05:00
terrafrost
ab270d1602 Merge branch '2.0' 2018-04-10 00:19:49 -05:00
terrafrost
4548b45b9e Merge branch '1.0' into 2.0 2018-04-09 23:57:25 -05:00
terrafrost
c63c223972 BigInteger: fix for (new BigInteger(48))->toString(true) 2018-04-09 23:47:38 -05:00
terrafrost
a3081aa7f8 Merge branch 'master' of https://github.com/phpseclib/phpseclib 2018-04-03 20:30:27 -05:00
terrafrost
011f6ad200 BigInteger/PHP: make sure that zero is represented uniformly 2018-04-03 20:23:47 -05:00
Wes
d4a98457bc Check phpinfo() is available before using
Fixes an issue I raised at https://github.com/phpseclib/phpseclib/issues/1255

Proof of logic at https://3v4l.org/RqrHt

I ended up moving more code than discussed in the issue - initially to avoid `$content` being undefined when it came to `preg_match_all()`, but also as it made sense grouping the code that way. Also, initialising `$versions` outside the check, right at the start ensures it's always defined for the `switch` code further down.
2018-03-24 11:05:16 +00:00
luz.paz
380517ef00 Misc. trivial typos
Found via `codespell -q 3`
2018-03-03 07:07:14 -05:00
terrafrost
44ac8f3996 Merge branch '2.0' 2018-01-22 07:26:57 -06:00
terrafrost
364e05babf Merge branch '1.0' into 2.0 2018-01-22 07:22:29 -06:00
terrafrost
92623daba8 BigInteger: fix issues with bitwise_xor 2018-01-22 00:38:42 -06:00
terrafrost
239a32ff06
Merge pull request #1222 from rrran/extract_func_phpdoc
Add PhpDoc @var for extract() functions
2017-12-23 14:18:28 -06:00
Sokolovskyy Roman
62ee1a5747 Multiline phpdoc for extract to one liner 2017-12-21 10:14:53 +01:00
terrafrost
0074539429 Merge branch 'array_to_short_syntax' 2017-12-04 23:03:35 -06:00
Sokolovskyy Roman
c705e7d9c6 Add PhpDoc @var for extract() functions 2017-12-04 11:11:43 +01:00
Sokolovskyy Roman
966ee7f170 Long array() to short [] syntax 2017-11-27 09:30:14 +01:00
terrafrost
88b34382f9 Merge branch '2.0-is-prime' 2017-11-22 19:52:49 -06:00
terrafrost
cd58e3be1d Merge branch '1.0-is-prime' into 2.0-is-prime 2017-11-22 19:50:49 -06:00
terrafrost
5ba61146e6 BigInteger: adjustment to isPrime 2017-11-22 19:49:55 -06:00
terrafrost
ec579bd9ed revisions to rrran's PHPDoc changes 2017-11-05 14:35:27 -06:00
terrafrost
10828543ce Merge remote-tracking branch 'rrran/Fixes3' 2017-11-05 13:16:03 -06:00
terrafrost
5f3c49cbcc Merge remote-tracking branch 'lzylinl/master' 2017-11-05 12:57:29 -06:00
terrafrost
6f6b93b012 BigInteger/GMP: use gmp_import / gmp_export 2017-11-05 12:33:22 -06:00
terrafrost
5801806d23 BigInteger/GMP: fix casting error 2017-11-05 12:28:16 -06:00
terrafrost
c7606818e0 BigInteger/Engines/PHP: small optimization to EvalBarrett engine 2017-11-05 01:56:04 -05:00
terrafrost
ff595f9951 BigInteger/Engines/PHP: fix issues with EvalBarrett reduction 2017-11-05 01:33:57 -05:00
terrafrost
5eec16041d BigInteger/Engines/PHP: HAC 14.42.2 does mod $b^{k+1}$ 2017-11-04 12:28:38 -05:00
terrafrost
f01cc6b099 BigInteger/Engines/PHP: fix issue with regular barrett engine 2017-11-04 02:16:01 -05:00
terrafrost
410e5aed96 BigInteger/Engines/PHP: use regular barrett for PHP32 engine 2017-11-04 02:15:32 -05:00
Sokolovskyy Roman
f40ea062c2 Lots of PHPDoc fixes 2017-10-25 11:44:14 +02:00
zylin
2fcc294cc6 Sometimes at php7 uniqid() return same result as their previous call. Here generates few equal labels wich makes error on eval. Does not know why uniqid() return same values but this is fact and my construction is more correct than previous. No need to call label id generation and use dirty goto :') 2017-10-23 22:31:18 +02:00
terrafrost
7a2f2e8e6b BigInteger\PHP: self::$primes -> static::$primes 2017-10-21 12:32:56 -05:00
terrafrost
ce92283c10 Merge branch '2.0' 2017-10-05 05:42:38 -05:00
terrafrost
6d51f2bf85 BigInteger: update bitwise_not fix for 2.0 2017-10-05 05:39:00 -05:00
terrafrost
245e7a15ca Merge branch '1.0' into 2.0 2017-10-05 05:37:56 -05:00
terrafrost
a7ebe7d39d BigInteger: fix bitwise_not for 0 2017-10-05 05:37:42 -05:00
terrafrost
03e15a5ab9 BigInteger: make constructor catch behave same as setEngine 2017-10-01 07:55:00 +01:00
terrafrost
256ffcca7b Merge remote-tracking branch 'pcf0/fix-biginteger-badconfigurationexception' 2017-10-01 07:53:54 +01:00
PCF
43803c6872
Catch BadConfigurationException in BigInteger 2017-09-30 02:47:00 +02:00
terrafrost
58768cb5aa Merge branch 'gmp-1.0' into gmp-2.0 2017-09-10 15:02:34 -05:00
terrafrost
b6d0e37432 BigInteger: use gmp_import / gmp_export when available 2017-09-10 14:56:57 -05:00
Sokolovskyy Roman
25c1ae6e00 Merge remote-tracking branch 'origin/master' into Bugfixes2 2017-08-09 12:28:02 +02:00
terrafrost
e7e30cd239 BigInteger: undo visibility changes 2017-08-07 22:38:56 -05:00
Sokolovskyy Roman
55cacdf7cd More PHPDOC fixes 2017-08-04 12:06:25 +02:00
Sokolovskyy Roman
de2e4662b0 Fixed wrong use of new self(1); 2017-08-03 09:26:46 +02:00
Sokolovskyy Roman
7bffa6bb8f Set of PHPDOC fixes 2017-08-03 09:26:09 +02:00
Sokolovskyy Roman
6f36c49baa Fixed methods visibility 2017-08-03 09:20:33 +02:00
Sokolovskyy Roman
d13f429b77 PHPDOC fixes 2017-08-03 09:20:17 +02:00
Sokolovskyy Roman
f314f9795f Fixed methods visibility 2017-08-03 09:20:05 +02:00
Sokolovskyy Roman
5583703040 Set of PHPDOC fixes 2017-08-03 09:15:16 +02:00
terrafrost
5fe629a171 BigInteger: modularize / modernize class and add new powmod engines 2017-06-26 20:07:10 -05:00
terrafrost
42def63b00 Merge remote-tracking branch 'upstream/master' into dsa-test-2 2017-02-02 21:07:47 -05:00
terrafrost
eb459daeaf add DSA implementation 2017-02-02 20:20:47 -05:00
terrafrost
fae358cc3c BigInteger: use public / private / protected 2017-01-05 00:20:18 -06:00
terrafrost
c852bae3c8 use short array syntax for arrays 2016-11-30 21:29:38 -06:00
terrafrost
874ada8d93 ASN1: make methods static 2016-11-27 22:38:11 -06:00
terrafrost
863ff6789b RSA: refactor PKCS1/PKCS8 to facilitate re-use 2016-11-17 08:09:10 -06:00
terrafrost
a862837a9a Merge remote-tracking branch 'origin/danog2' 2016-09-23 10:20:07 -05:00
terrafrost
8019baee62 BigInteger: add randomRange / randomPrimeRange
...and redo random / randomPrime such that they take the byte size
as the parameter instead of the range.
2016-09-17 19:48:51 -07:00
terrafrost
845135f887 add PHP5-style constructors along side PHP4-style ones 2016-09-10 10:41:05 -07:00
terrafrost
0ee24aa218 BigInteger: rm loopforeach method 2016-09-09 20:59:54 -08:00
terrafrost
72d1bdf60b a few changes to danog's changes 2016-09-08 00:22:30 -08:00
klemens
dd23d91d41 spelling fixes 2016-08-04 00:47:52 -05:00
terrafrost
c547ee16c7 Merge branch '1.0' into 2.0 2016-08-04 00:31:15 -05:00
klemens
dca95ac662 spelling fixes 2016-08-04 00:19:27 -05:00
danogentili
7cf300984c Added root, pow, max, min, loopforeach functions and tests. 2016-08-03 10:51:19 -04:00
terrafrost
7bdb09c4bd Merge branch '1.0' into 2.0 2016-06-18 23:29:33 -05:00
terrafrost
6ff421d354 BigInteger/RSA: don't compare openssl versions > 1.0 2016-06-18 23:28:33 -05:00
terrafrost
7a628c62b0 don't do phpinfo() check 2016-06-11 20:29:02 -05:00
terrafrost
e2a0b701c7 remove a few calls to paragonie/constant_time_encoding
- Hex::decode('aabb') can be replaced with "\xaa\xbb"
- Hex::decode(sha1('...')) can be replaced with sha1('...', true)
2016-06-04 22:31:23 -05:00
Paragon Initiative Enterprises
0e8fa93676 Use paragonie/constant_time_encoding 2016-05-12 16:28:40 -04:00
terrafrost
398a795e1f Revert "undo merging of master to 2.0 branch"
This reverts commit 8fb4c3363d.
2016-04-30 16:23:35 -05:00
terrafrost
8fb4c3363d undo merging of master to 2.0 branch 2016-04-28 15:34:10 -05:00
terrafrost
b4cf10fc94 Revert "Merge branch '2.0'"
This reverts commit be5f4ef6b19c82f6c898708cc8e1828b05e3d4e8, reversing
changes made to 638fe6971c.
2016-04-10 11:30:59 -05:00
terrafrost
4b69dcb1ca Revert "Merge remote-tracking branch 'bantu/bootstrap'"
This reverts commit ef04c870e9, reversing
changes made to cd57bf31ae.
2016-04-10 11:25:31 -05:00
terrafrost
2ae82a1bc7 Merge branch '2.0' 2016-03-19 12:23:11 -05:00
terrafrost
6bfbfdbf7e Merge branch '1.0' into 2.0 2016-03-19 12:23:04 -05:00
Abhishek Taneja
cb2ccea219 changing valid condition order, _slidingWindow biginteger 2016-03-19 12:11:59 -05:00
terrafrost
f8dc527af5 Merge branch 'master' into biginteger-revamp 2016-01-08 10:43:49 -06:00
terrafrost
1e15ef5a55 Merge branch 'bitwise-not-1.0' into 2.0 2016-01-08 10:42:20 -06:00
terrafrost
7ad9eade2d BigInteger: fix issue with doing bitwise not on 0 2016-01-08 10:31:48 -06:00
terrafrost
f7efbcbc8e BigInteger: updates per Joey3000 2016-01-08 10:19:48 -06:00
terrafrost
d86c61de78 BigInteger: add getprecision 2016-01-03 10:42:44 -06:00
terrafrost
a0d21b6321 BigInteger: make select methods static, add type hinting, etc 2015-12-27 10:24:17 -06:00
terrafrost
eac8613c75 BigInteger: 2.0 specific updates for __debuginfo 2015-12-14 13:56:07 -06:00
terrafrost
8448f63d76 Merge branch '1.0' into 2.0 2015-12-14 11:01:51 -06:00
terrafrost
c655b16f75 BigInteger: add engine to __debugInfo output and add unit test 2015-12-07 15:22:53 -06:00
terrafrost
37535744b2 small tweaks 2015-11-21 22:55:20 -05:00
terrafrost
33ea01f1ac Merge branch 'phpdoc-1.0' into phpdoc-2.0
Conflicts:
	phpseclib/Crypt/AES.php
	phpseclib/Crypt/Base.php
	phpseclib/Crypt/Blowfish.php
	phpseclib/Crypt/DES.php
	phpseclib/Crypt/Hash.php
	phpseclib/Crypt/RC2.php
	phpseclib/Crypt/RC4.php
	phpseclib/Crypt/RSA.php
	phpseclib/Crypt/Rijndael.php
	phpseclib/Crypt/TripleDES.php
	phpseclib/Crypt/Twofish.php
	phpseclib/File/ASN1.php
	phpseclib/File/X509.php
	phpseclib/Math/BigInteger.php
	phpseclib/Net/SCP.php
	phpseclib/Net/SFTP.php
	phpseclib/Net/SSH1.php
	phpseclib/Net/SSH2.php
	phpseclib/System/SSH/Agent.php
2015-10-12 14:10:26 -05:00
terrafrost
2048a49aac use self:: in phpdoc comments to reduce merge conflicts 2015-10-11 12:22:07 -05:00
terrafrost
19229ed224 phpDoc changes 2015-10-05 13:22:51 -05:00
Graham Campbell
7f1bbfe216 Fixed phpdoc 2015-09-14 16:30:31 +01:00
terrafrost
3f7b3b393e Merge branch 'php7' into 2.0
Conflicts:
	phpseclib/Math/BigInteger.php
2015-09-13 19:15:13 -05:00
terrafrost
833da775b6 BigInteger: fix PHP7 error
$x = gmp_init(6); empty($x); demonstrates the problem
2015-09-13 19:13:31 -05:00
Andreas Fischer
2986ea9d6d Merge pull request #816 from terrafrost/small-tweaks
small CS changes

* terrafrost/small-tweaks:
  small CS changes
2015-09-14 01:30:54 +02:00
Andreas Fischer
4387b64426 Merge branch '1.0' into 2.0
* 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
2015-09-14 01:27:04 +02:00
terrafrost
8b8d7a5dcd small CS changes 2015-09-13 18:13:35 -05:00
Graham Campbell
b1db7f05d9 Minor tweaks 2015-09-06 23:01:03 +01:00
Graham Campbell
eec8c9cb5d More fixes 2015-09-06 12:39:14 +01:00
Graham Campbell
dd031a1702 PHPDoc fixes 2015-09-06 12:28:08 +01:00
Andreas Fischer
864493bbf6 Merge pull request #790 from cweagans/switch-to-extension-loaded-2.0
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
2015-09-04 15:05:40 +02:00
Andreas Fischer
e08e2fd300 Merge pull request #791 from cweagans/switch-to-extension-loaded-1.0
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
2015-09-04 15:04:17 +02:00
Cameron Eagans
8206061a30 Remove unnecessary parens 2015-09-02 15:22:37 -04:00
Graham Campbell
634c1c2a18 Fixed lots of phpdoc typos 2015-09-02 00:42:15 +01:00
Graham Campbell
c08c099c56 Fixed invalid param phpdoc 2015-09-02 00:41:38 +01:00