1
0
mirror of https://github.com/php/php-src.git synced 2026-04-03 14:12:38 +02:00
Commit Graph

22 Commits

Author SHA1 Message Date
Máté Kocsis
4679805cd6 Declare ext/sodium constants in stubs (#9225) 2022-08-02 13:57:52 +02:00
Tim Düsterhus
342e18f105 Support the actual #[\SensitiveParameter] attribute in stubs (#8836) 2022-07-12 12:43:44 +02:00
Máté Kocsis
49d3dde211 Declare true return types (#8759) 2022-06-18 22:06:50 +02:00
Tim Düsterhus
8f8243318d Mark parameter in ext/sodium as sensitive 2022-06-13 11:09:12 +02:00
Paragon Initiative Enterprises
afd8f84c1a Add sodium_crypto_stream_xchacha20_xor_ic()
There are many use-cases where a PHP user is currently using sodium_compat's implementation of this low-level XChaCha20 API. For example, multi-part message processing (in low-memory settings) for a ciphertext that was encrypted with XChaCha20-Poly1305 (rather than the secretstream API).

Adding this function to ext/sodium offers better performance and lowers users' memory usage with the polyfill, and ensures that users coming from other languages that provide libsodium bindings have a more consistent experience with our bindings. This is a win-win.

This patch follows the libsodium precedent of adding functions instead of optional parameters to existing functions. The parameter order is also consistent with the C API.

https://doc.libsodium.org/advanced/stream_ciphers/xchacha20#usage

Closes GH-8276.
2022-04-04 15:43:42 +02:00
Máté Kocsis
10a2079b13 Remove extra space before return type
For consistency and searchability reasons
2021-10-18 14:28:46 +02:00
Máté Kocsis
d9e5e63032 Add more specific array return type hints for various extensions - part 6 (#7474) 2021-10-07 14:29:29 +02:00
Máté Kocsis
a5e5483439 Remove extra space before param default values 2021-09-08 12:24:47 +02:00
Máté Kocsis
765aec8623 Generate optimizer func info from stubs for ext/sodium (#7404) 2021-08-26 10:44:38 +02:00
Nikita Popov
a9695aa155 Merge branch 'PHP-8.0'
* PHP-8.0:
  Correct the argument names for ext/sodium functions
2021-05-10 17:22:41 +02:00
Paragon Initiative Enterprises
0c57ebb116 Correct the argument names for ext/sodium functions
Closes GH-6969.
2021-05-10 17:22:02 +02:00
P.I.E. Security Team
9b794f8e5e Expose libsodium's Ristretto255 API (#6922) 2021-05-07 17:43:00 -05:00
P.I.E. Security Team
f7f1f7fce2 Add crypto_stream_xchacha20 to ext/sodium (#6868)
Paragon Initiative Enterprises is aware of PHP applications that use sodium_compat's ParagonIE\Sodium\Core\XChaCha20 class directly for stream encryption.

Greater performance and security assurance is offered by exposing libsodium's crypto_stream_xchacha20 API to PHP users.

It's acceptable to only include this change in PHP 8.1+; the offending applications are more than welcome to either install ext/sodium from PECL or upgrade to 8.1 when it comes out later this year.

Ref: https://github.com/jedisct1/libsodium-php/pull/211
2021-04-19 11:04:29 +02:00
Máté Kocsis
a730dc0cf9 Generate class entries for snmp, soap, sockets, sodium, sqlite3, sysv*, tidy
Closes GH-6696
2021-02-15 11:45:26 +01:00
Christoph M. Becker
49ef8bc026 Add missing stub for SodiumException
Closes GH-6649.
2021-01-28 23:25:59 +01:00
Nikita Popov
8c68745f43 Update ext/sodium parameter names
Closes GH-6279.
2020-10-13 10:41:35 +02:00
Máté Kocsis
bdacd2ae8f Add a few missing types to stubs 2020-08-01 23:55:08 +02:00
Máté Kocsis
21cfa03f17 Generate function entries for another batch of extensions
Closes GH-5352
2020-04-05 21:15:30 +02:00
Máté Kocsis
a43bc33fb2 Annotate function aliases in stubs 2020-04-04 13:03:16 +02:00
Máté Kocsis
118b04bd6e Improve argument error messages in ext/sodium
Closes GH-5197
2020-02-28 18:09:39 +01:00
Máté Kocsis
27e83d0fb8 Add union return types for function stubs 2019-11-11 14:54:55 +01:00
Christoph M. Becker
f7c61c070f Add ext/sodium arginfo stubs 2019-10-21 10:19:57 +02:00