Skip to content

Commit

Permalink
Merge pull request #394 from thecodingmachine/create-pull-request/reg…
Browse files Browse the repository at this point in the history
…enerate-files

Automatically regenerate the files
  • Loading branch information
Kharhamel committed Oct 1, 2022
2 parents b141ff5 + 9a9fd57 commit 0c5bae9
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 1 deletion.
37 changes: 37 additions & 0 deletions generated/curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -3109,6 +3109,17 @@ function curl_multi_setopt(\CurlMultiHandle $multi_handle, int $option, $value):
*
*
*
* CURLOPT_XFERINFOFUNCTION
*
* A callback accepting two parameters.
* Has a similar purpose as CURLOPT_PROGRESSFUNCTION but is more modern
* and the preferred option from cURL.
*
*
* Added in 7.32.0. Available as of PHP 8.2.0.
*
*
*
*
*
*
Expand Down Expand Up @@ -3274,3 +3285,29 @@ function curl_unescape(\CurlHandle $handle, string $string): string
}
return $safeResult;
}


/**
* Available if built against libcurl >= 7.62.0.
*
* Some protocols have "connection upkeep" mechanisms.
* These mechanisms usually send some traffic on existing connections in order to keep them alive;
* this can prevent connections from being closed due to overzealous firewalls, for example.
*
* Connection upkeep is currently available only for HTTP/2 connections.
* A small amount of traffic is usually sent to keep a connection alive.
* HTTP/2 maintains its connection by sending a HTTP/2 PING frame.
*
* @param \CurlHandle $handle A cURL handle returned by
* curl_init.
* @throws CurlException
*
*/
function curl_upkeep(\CurlHandle $handle): void
{
error_clear_last();
$safeResult = \curl_upkeep($handle);
if ($safeResult === false) {
throw CurlException::createFromPhpError($handle);
}
}
3 changes: 3 additions & 0 deletions generated/functionsList.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@
'curl_share_errno',
'curl_share_setopt',
'curl_unescape',
'curl_upkeep',
'date',
'date_parse',
'date_parse_from_format',
Expand Down Expand Up @@ -638,6 +639,7 @@
'opendir',
'openlog',
'openssl_cipher_iv_length',
'openssl_cipher_key_length',
'openssl_cms_decrypt',
'openssl_cms_encrypt',
'openssl_cms_read',
Expand Down Expand Up @@ -954,6 +956,7 @@
'sodium_crypto_secretbox_open',
'sodium_crypto_sign_open',
'sodium_crypto_sign_verify_detached',
'sodium_crypto_stream_xchacha20_xor_ic',
'solr_get_version',
'spl_autoload_register',
'spl_autoload_unregister',
Expand Down
2 changes: 1 addition & 1 deletion generated/ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ function ldap_get_entries($ldap, $result): array
*
*
* LDAP_OPT_DIAGNOSTIC_MESSAGE
* int
* string
*
*
*
Expand Down
19 changes: 19 additions & 0 deletions generated/openssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,25 @@ function openssl_cipher_iv_length(string $cipher_algo): int
}


/**
* Gets the cipher key length.
*
* @param string $cipher_algo The cipher method, see openssl_get_cipher_methods for a list of potential values.
* @return Returns the cipher length on success.
* @throws OpensslException
*
*/
function openssl_cipher_key_length(string $cipher_algo)
{
error_clear_last();
$safeResult = \openssl_cipher_key_length($cipher_algo);
if ($safeResult === false) {
throw OpensslException::createFromPhpError();
}
return $safeResult;
}


/**
* Decrypts a CMS message.
*
Expand Down
24 changes: 24 additions & 0 deletions generated/sodium.php
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,27 @@ function sodium_crypto_sign_verify_detached(string $signature, string $message,
throw SodiumException::createFromPhpError();
}
}


/**
* The function is similar to sodium_crypto_stream_xchacha20_xor
* but adds the ability to set the initial value of the block counter to a non-zero value.
* This permits direct access to any block without having to compute the previous ones.
*
* @param string $message The message to encrypt.
* @param string $nonce 24-byte nonce.
* @param int $counter The initial value of the block counter.
* @param string $key Key, possibly generated from sodium_crypto_stream_xchacha20_keygen.
* @return string Encrypted message.
* @throws SodiumException
*
*/
function sodium_crypto_stream_xchacha20_xor_ic(string $message, string $nonce, int $counter, string $key): string
{
error_clear_last();
$safeResult = \sodium_crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key);
if ($safeResult === false) {
throw SodiumException::createFromPhpError();
}
return $safeResult;
}
3 changes: 3 additions & 0 deletions rector-migrate.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@
'curl_share_errno' => 'Safe\curl_share_errno',
'curl_share_setopt' => 'Safe\curl_share_setopt',
'curl_unescape' => 'Safe\curl_unescape',
'curl_upkeep' => 'Safe\curl_upkeep',
'date' => 'Safe\date',
'date_parse' => 'Safe\date_parse',
'date_parse_from_format' => 'Safe\date_parse_from_format',
Expand Down Expand Up @@ -645,6 +646,7 @@
'opendir' => 'Safe\opendir',
'openlog' => 'Safe\openlog',
'openssl_cipher_iv_length' => 'Safe\openssl_cipher_iv_length',
'openssl_cipher_key_length' => 'Safe\openssl_cipher_key_length',
'openssl_cms_decrypt' => 'Safe\openssl_cms_decrypt',
'openssl_cms_encrypt' => 'Safe\openssl_cms_encrypt',
'openssl_cms_read' => 'Safe\openssl_cms_read',
Expand Down Expand Up @@ -961,6 +963,7 @@
'sodium_crypto_secretbox_open' => 'Safe\sodium_crypto_secretbox_open',
'sodium_crypto_sign_open' => 'Safe\sodium_crypto_sign_open',
'sodium_crypto_sign_verify_detached' => 'Safe\sodium_crypto_sign_verify_detached',
'sodium_crypto_stream_xchacha20_xor_ic' => 'Safe\sodium_crypto_stream_xchacha20_xor_ic',
'solr_get_version' => 'Safe\solr_get_version',
'spl_autoload_register' => 'Safe\spl_autoload_register',
'spl_autoload_unregister' => 'Safe\spl_autoload_unregister',
Expand Down

0 comments on commit 0c5bae9

Please sign in to comment.